aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel <kingdread@gmx.de>2020-04-25 12:53:54 +0200
committerDaniel <kingdread@gmx.de>2020-04-25 12:53:54 +0200
commitd124265bee159193090f085343b8523bc6387620 (patch)
tree514a837c1326a96982b9353709f570129e8135a2
parent675d0aadf1495a7ac752789c125e124db5152b43 (diff)
downloadraidgrep-d124265bee159193090f085343b8523bc6387620.tar.gz
raidgrep-d124265bee159193090f085343b8523bc6387620.tar.bz2
raidgrep-d124265bee159193090f085343b8523bc6387620.zip
cosmetic fixes
-rw-r--r--src/main.rs26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/main.rs b/src/main.rs
index e18a109..66b2880 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -45,18 +45,18 @@ macro_rules! unwrap {
///
/// PREDICATES:
///
-/// -character REGEX True if the character name matches the regex.
-/// -account REGEX True if the account name matches the regex.
-/// -name REGEX True if either character or account name match.
+/// -character REGEX True if the character name matches the regex.
+/// -account REGEX True if the account name matches the regex.
+/// -name REGEX True if either character or account name match.
///
-/// -success Only include successful logs.
-/// -wipe Only include failed logs.
-/// -outcome OUTCOMES Only include logs with the given outcomes.
-/// -weekday WEEKDAYS Only include logs from the given weekdays.
-/// -before DATE Only include logs from before the given date.
-/// -after DATE Only include logs from after the given date.
-/// -boss BOSSES Only include logs from the given bosses.
-/// -player REGEX Shorthand to check if any player in the log has the given name.
+/// -success Only include successful logs.
+/// -wipe Only include failed logs.
+/// -outcome OUTCOMES Only include logs with the given outcomes.
+/// -weekday WEEKDAYS Only include logs from the given weekdays.
+/// -before DATE Only include logs from before the given date.
+/// -after DATE Only include logs from after the given date.
+/// -boss BOSSES Only include logs from the given bosses.
+/// -player REGEX Shorthand to check if any player in the log has the given name.
#[derive(StructOpt, Debug)]
#[structopt(verbatim_doc_comment)]
pub struct Opt {
@@ -262,7 +262,7 @@ fn single(opt: &Opt) -> Result<()> {
if opt.expression.len() == 1 {
let line = &opt.expression[0];
let maybe_filter = build_filter(line);
- if let Err(_) = maybe_filter {
+ if maybe_filter.is_err() {
let maybe_regex = Regex::new(line);
if let Ok(rgx) = maybe_regex {
let filter = filters::player::any(
@@ -299,7 +299,7 @@ fn repl(opt: &Opt) -> Result<()> {
let parsed = build_filter(&line);
match parsed {
Ok(filter) => grep(&opt, &*filter)?,
- Err(err) => display_error(&err.into()),
+ Err(err) => display_error(&err),
}
}
}