diff options
author | Andrew Gallant <jamslam@gmail.com> | 2018-08-20 17:34:40 -0400 |
---|---|---|
committer | Andrew Gallant <jamslam@gmail.com> | 2018-08-20 17:34:45 -0400 |
commit | 7eaaa04c6999487b8806e90ba63f04c5cfd9e697 (patch) | |
tree | e49936a4761d582d43e0ab1a48ac184a3b27620a /src | |
parent | 87a627631cacbbffc4fe7601deb47cea76ba322d (diff) |
ripgrep: small cleanupsgrep-search-0.1.0grep-regex-0.1.0grep-printer-0.1.0grep-pcre2-0.1.0grep-matcher-0.1.0grep-0.2.0
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 33bc84cd..0c6d00f9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -41,10 +41,10 @@ mod search; mod subject; mod unescape; -pub type Result<T> = ::std::result::Result<T, Box<::std::error::Error>>; +type Result<T> = ::std::result::Result<T, Box<::std::error::Error>>; -pub fn main() { - match Args::parse().and_then(run) { +fn main() { + match Args::parse().and_then(try_main) { Ok(true) => process::exit(0), Ok(false) => process::exit(1), Err(err) => { @@ -54,7 +54,7 @@ pub fn main() { } } -fn run(args: Args) -> Result<bool> { +fn try_main(args: Args) -> Result<bool> { use args::Command::*; match args.command()? { |