@@ -26,7 +26,7 @@ impl Simpath {
2626 ///
2727 /// fn main() {
2828 /// let search_path = Simpath::new("PATH");
29- /// let ls_file = search_path.find_file ("ls");
29+ /// let ls_file = search_path.find ("ls");
3030 /// match ls_file {
3131 /// Ok(path) => println!("'ls' was found at '{}'", path.display()),
3232 /// Err(e) => println!("{}", e)
@@ -77,14 +77,14 @@ impl Simpath {
7777 ///
7878 /// fn main() {
7979 /// let search_path = Simpath::new("PATH");
80- /// match search_path.find_file ("my-file") {
80+ /// match search_path.find ("my-file") {
8181 /// Ok(_found_dir) => println!("Didn't expect that!!"),
8282 /// Err(e) => println!("{}", e.to_string())
8383 /// }
8484 /// }
8585 /// ```
8686 ///
87- pub fn find_file ( & self , file_name : & str ) -> Result < PathBuf , Error > {
87+ pub fn find ( & self , file_name : & str ) -> Result < PathBuf , Error > {
8888 for search_dir in & self . dirs {
8989 for entry in fs:: read_dir ( search_dir) ? {
9090 let file = entry?;
@@ -94,7 +94,7 @@ impl Simpath {
9494 }
9595 }
9696 Err ( Error :: new ( ErrorKind :: NotFound ,
97- format ! ( "Could not find file '{}' in search path '{}'" ,
97+ format ! ( "Could not find '{}' in search path '{}'" ,
9898 file_name, self . name) ) )
9999 }
100100
@@ -201,7 +201,7 @@ mod test {
201201 #[ test]
202202 fn find_non_existant_file ( ) {
203203 let path = Simpath :: new ( "MyName" ) ;
204- assert ! ( path. find_file ( "no_such_file" ) . is_err( ) ) ;
204+ assert ! ( path. find ( "no_such_file" ) . is_err( ) ) ;
205205 }
206206
207207 #[ test]
0 commit comments