File tree Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Expand file tree Collapse file tree 1 file changed +0
-12
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ use std::path::{Path, PathBuf};
2020use std:: sync:: atomic:: Ordering ;
2121
2222use log:: debug;
23- use std:: env;
2423use std:: fs;
2524use std:: io;
2625
@@ -64,9 +63,6 @@ pub trait FileLoader {
6463 /// Query the existence of a file.
6564 fn file_exists ( & self , path : & Path ) -> bool ;
6665
67- /// Returns an absolute path to a file, if possible.
68- fn abs_path ( & self , path : & Path ) -> Option < PathBuf > ;
69-
7066 /// Read the contents of an UTF-8 file into memory.
7167 fn read_file ( & self , path : & Path ) -> io:: Result < String > ;
7268}
@@ -79,14 +75,6 @@ impl FileLoader for RealFileLoader {
7975 fs:: metadata ( path) . is_ok ( )
8076 }
8177
82- fn abs_path ( & self , path : & Path ) -> Option < PathBuf > {
83- if path. is_absolute ( ) {
84- Some ( path. to_path_buf ( ) )
85- } else {
86- env:: current_dir ( ) . ok ( ) . map ( |cwd| cwd. join ( path) )
87- }
88- }
89-
9078 fn read_file ( & self , path : & Path ) -> io:: Result < String > {
9179 fs:: read_to_string ( path)
9280 }
You can’t perform that action at this time.
0 commit comments