diff options
Diffstat (limited to 'grep/examples/simplegrep.rs')
-rw-r--r-- | grep/examples/simplegrep.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grep/examples/simplegrep.rs b/grep/examples/simplegrep.rs index 85e2f778..37b6a0c4 100644 --- a/grep/examples/simplegrep.rs +++ b/grep/examples/simplegrep.rs @@ -21,7 +21,7 @@ fn main() { } } -fn try_main() -> Result<(), Box<Error>> { +fn try_main() -> Result<(), Box<dyn Error>> { let mut args: Vec<OsString> = env::args_os().collect(); if args.len() < 2 { return Err("Usage: simplegrep <pattern> [<path> ...]".into()); @@ -32,7 +32,7 @@ fn try_main() -> Result<(), Box<Error>> { search(cli::pattern_from_os(&args[1])?, &args[2..]) } -fn search(pattern: &str, paths: &[OsString]) -> Result<(), Box<Error>> { +fn search(pattern: &str, paths: &[OsString]) -> Result<(), Box<dyn Error>> { let matcher = RegexMatcher::new_line_matcher(&pattern)?; let mut searcher = SearcherBuilder::new() .binary_detection(BinaryDetection::quit(b'\x00')) |