File tree 1 file changed +0
-12
lines changed
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};
20
20
use std:: sync:: atomic:: Ordering ;
21
21
22
22
use log:: debug;
23
- use std:: env;
24
23
use std:: fs;
25
24
use std:: io;
26
25
@@ -64,9 +63,6 @@ pub trait FileLoader {
64
63
/// Query the existence of a file.
65
64
fn file_exists ( & self , path : & Path ) -> bool ;
66
65
67
- /// Returns an absolute path to a file, if possible.
68
- fn abs_path ( & self , path : & Path ) -> Option < PathBuf > ;
69
-
70
66
/// Read the contents of an UTF-8 file into memory.
71
67
fn read_file ( & self , path : & Path ) -> io:: Result < String > ;
72
68
}
@@ -79,14 +75,6 @@ impl FileLoader for RealFileLoader {
79
75
fs:: metadata ( path) . is_ok ( )
80
76
}
81
77
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
-
90
78
fn read_file ( & self , path : & Path ) -> io:: Result < String > {
91
79
fs:: read_to_string ( path)
92
80
}
You can’t perform that action at this time.
0 commit comments