[INFO] updating cached repository timvisee/i3lock-slick [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/timvisee/i3lock-slick [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/timvisee/i3lock-slick" "work/ex/clippy-test-run/sources/stable/gh/timvisee/i3lock-slick"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/timvisee/i3lock-slick'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/timvisee/i3lock-slick" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/timvisee/i3lock-slick"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/timvisee/i3lock-slick'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 6b184974eec0b057848a13674d196d2f528b38b8 [INFO] sha for GitHub repo timvisee/i3lock-slick: 6b184974eec0b057848a13674d196d2f528b38b8 [INFO] validating manifest of timvisee/i3lock-slick on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of timvisee/i3lock-slick on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing timvisee/i3lock-slick [INFO] finished frobbing timvisee/i3lock-slick [INFO] frobbed toml for timvisee/i3lock-slick written to work/ex/clippy-test-run/sources/stable/gh/timvisee/i3lock-slick/Cargo.toml [INFO] started frobbing timvisee/i3lock-slick [INFO] finished frobbing timvisee/i3lock-slick [INFO] frobbed toml for timvisee/i3lock-slick written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/timvisee/i3lock-slick/Cargo.toml [INFO] crate timvisee/i3lock-slick has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting timvisee/i3lock-slick against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/timvisee/i3lock-slick:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] b3f10ce5194607a4c64d8b44ccf14e0903e00bb5097a404a1000173e739edcef [INFO] running `"docker" "start" "-a" "b3f10ce5194607a4c64d8b44ccf14e0903e00bb5097a404a1000173e739edcef"` [INFO] [stderr] Checking either v1.3.0 [INFO] [stderr] Checking bitflags v1.0.0 [INFO] [stderr] Checking serde v1.0.16 [INFO] [stderr] Checking shellexpand v1.0.0 [INFO] [stderr] Checking version-compare v0.0.6 [INFO] [stderr] Checking memchr v1.0.2 [INFO] [stderr] Checking enum_primitive v0.1.1 [INFO] [stderr] Checking deflate v0.7.17 [INFO] [stderr] Checking tempdir v0.3.5 [INFO] [stderr] Checking num-rational v0.1.39 [INFO] [stderr] Checking aho-corasick v0.6.3 [INFO] [stderr] Checking nom v3.2.1 [INFO] [stderr] Checking thread_local v0.3.4 [INFO] [stderr] Checking coco v0.1.1 [INFO] [stderr] Checking regex v0.2.2 [INFO] [stderr] Checking rayon-core v1.2.1 [INFO] [stderr] Checking png v0.11.0 [INFO] [stderr] Checking rayon v0.8.2 [INFO] [stderr] Checking jpeg-decoder v0.1.13 [INFO] [stderr] Checking image v0.17.0 [INFO] [stderr] Checking toml v0.4.5 [INFO] [stderr] Checking serde_json v1.0.5 [INFO] [stderr] Checking config v0.7.0 [INFO] [stderr] Checking i3lock-slick v0.0.1 (/opt/crater/workdir) [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:2:18 [INFO] [stderr] | [INFO] [stderr] 2 | pub const NAME: &'static str = env!("CARGO_PKG_NAME"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:3:21 [INFO] [stderr] | [INFO] [stderr] 3 | pub const VERSION: &'static str = env!("CARGO_PKG_VERSION"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:4:25 [INFO] [stderr] | [INFO] [stderr] 4 | pub const DESCRIPTION: &'static str = env!("CARGO_PKG_DESCRIPTION"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:5:20 [INFO] [stderr] | [INFO] [stderr] 5 | pub const AUTHOR: &'static str = env!("CARGO_PKG_AUTHORS"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/cmd.rs:2:21 [INFO] [stderr] | [INFO] [stderr] 2 | pub const ARG_DRY: &'static str = "dry"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/cmd.rs:3:24 [INFO] [stderr] | [INFO] [stderr] 3 | pub const ARG_FILTER: &'static str = "filter"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/cmd.rs:4:23 [INFO] [stderr] | [INFO] [stderr] 4 | pub const ARG_PARAM: &'static str = "parameter"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/img/mod.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | pub mod img; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/img/img_proc/mod.rs:9:1 [INFO] [stderr] | [INFO] [stderr] 9 | pub mod img_proc; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/main.rs:47:16 [INFO] [stderr] | [INFO] [stderr] 47 | || env::home_dir(), [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:2:18 [INFO] [stderr] | [INFO] [stderr] 2 | pub const NAME: &'static str = env!("CARGO_PKG_NAME"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:3:21 [INFO] [stderr] | [INFO] [stderr] 3 | pub const VERSION: &'static str = env!("CARGO_PKG_VERSION"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:4:25 [INFO] [stderr] | [INFO] [stderr] 4 | pub const DESCRIPTION: &'static str = env!("CARGO_PKG_DESCRIPTION"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/app.rs:5:20 [INFO] [stderr] | [INFO] [stderr] 5 | pub const AUTHOR: &'static str = env!("CARGO_PKG_AUTHORS"); [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/cmd.rs:2:21 [INFO] [stderr] | [INFO] [stderr] 2 | pub const ARG_DRY: &'static str = "dry"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/cmd.rs:3:24 [INFO] [stderr] | [INFO] [stderr] 3 | pub const ARG_FILTER: &'static str = "filter"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/cmd.rs:4:23 [INFO] [stderr] | [INFO] [stderr] 4 | pub const ARG_PARAM: &'static str = "parameter"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/img/mod.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | pub mod img; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::module_inception)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: module has the same name as its containing module [INFO] [stderr] --> src/img/img_proc/mod.rs:9:1 [INFO] [stderr] | [INFO] [stderr] 9 | pub mod img_proc; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/main.rs:47:16 [INFO] [stderr] | [INFO] [stderr] 47 | || env::home_dir(), [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/config.rs:102:9 [INFO] [stderr] | [INFO] [stderr] 102 | / if self.data.is_none() { [INFO] [stderr] 103 | | return None; [INFO] [stderr] 104 | | } [INFO] [stderr] | |_________^ help: replace_it_with: `self.data?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::question_mark)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the BTreeMap [INFO] [stderr] --> src/config.rs:172:41 [INFO] [stderr] | [INFO] [stderr] 172 | map.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/config.rs:254:21 [INFO] [stderr] | [INFO] [stderr] 254 | val.unwrap_or("".into()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".into())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this call to `as_ref` does nothing [INFO] [stderr] --> src/img/img_proc/img_proc.rs:62:46 [INFO] [stderr] | [INFO] [stderr] 62 | Some(ref mut prop) => prop.parse(value.as_ref()), [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try this: `value` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_asref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:29:14 [INFO] [stderr] | [INFO] [stderr] 29 | .ok_or(Error::new("Incorrect filter format"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Incorrect filter format"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:37:14 [INFO] [stderr] | [INFO] [stderr] 37 | .ok_or(Error::new("Failed to parse the filter name"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Failed to parse the filter name"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:36:14 [INFO] [stderr] | [INFO] [stderr] 36 | .ok_or(Error::new("Unable to find filter name, maybe it is missing"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Unable to find filter name, maybe it is missing"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:56:22 [INFO] [stderr] | [INFO] [stderr] 56 | .ok_or(Error::new("Incorrect filter property format"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Incorrect filter property format"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:64:22 [INFO] [stderr] | [INFO] [stderr] 64 | .ok_or(Error::new("Unable to parse filter property name"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Unable to parse filter property name"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:63:22 [INFO] [stderr] | [INFO] [stderr] 63 | .ok_or(Error::new("Missing filter property name"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Missing filter property name"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:71:22 [INFO] [stderr] | [INFO] [stderr] 71 | .ok_or(Error::new("Unable to parse filter property value"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Unable to parse filter property value"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:70:22 [INFO] [stderr] | [INFO] [stderr] 70 | .ok_or(Error::new("Missing filter property value"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Missing filter property value"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/config.rs:102:9 [INFO] [stderr] | [INFO] [stderr] 102 | / if self.data.is_none() { [INFO] [stderr] 103 | | return None; [INFO] [stderr] 104 | | } [INFO] [stderr] | |_________^ help: replace_it_with: `self.data?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::question_mark)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the BTreeMap [INFO] [stderr] --> src/config.rs:172:41 [INFO] [stderr] | [INFO] [stderr] 172 | map.into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/config.rs:254:21 [INFO] [stderr] | [INFO] [stderr] 254 | val.unwrap_or("".into()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".into())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:59:12 [INFO] [stderr] | [INFO] [stderr] 59 | if &filter == FILTER_NEAREST || &filter == FILTER_NEAREST_SHORT { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:59:41 [INFO] [stderr] | [INFO] [stderr] 59 | if &filter == FILTER_NEAREST || &filter == FILTER_NEAREST_SHORT { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:61:19 [INFO] [stderr] | [INFO] [stderr] 61 | } else if &filter == FILTER_TRIANGLE { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:63:19 [INFO] [stderr] | [INFO] [stderr] 63 | } else if &filter == FILTER_CATMULLROM { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:65:19 [INFO] [stderr] | [INFO] [stderr] 65 | } else if &filter == FILTER_GAUSSIAN { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:67:19 [INFO] [stderr] | [INFO] [stderr] 67 | } else if &filter == FILTER_LANCZOS3 { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: this call to `as_ref` does nothing [INFO] [stderr] --> src/img/img_proc/img_proc.rs:62:46 [INFO] [stderr] | [INFO] [stderr] 62 | Some(ref mut prop) => prop.parse(value.as_ref()), [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try this: `value` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_asref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_asref [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:29:14 [INFO] [stderr] | [INFO] [stderr] 29 | .ok_or(Error::new("Incorrect filter format"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Incorrect filter format"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:37:14 [INFO] [stderr] | [INFO] [stderr] 37 | .ok_or(Error::new("Failed to parse the filter name"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Failed to parse the filter name"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:36:14 [INFO] [stderr] | [INFO] [stderr] 36 | .ok_or(Error::new("Unable to find filter name, maybe it is missing"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Unable to find filter name, maybe it is missing"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:56:22 [INFO] [stderr] | [INFO] [stderr] 56 | .ok_or(Error::new("Incorrect filter property format"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Incorrect filter property format"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:64:22 [INFO] [stderr] | [INFO] [stderr] 64 | .ok_or(Error::new("Unable to parse filter property name"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Unable to parse filter property name"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:63:22 [INFO] [stderr] | [INFO] [stderr] 63 | .ok_or(Error::new("Missing filter property name"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Missing filter property name"))` [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/intent.rs:41:33 [INFO] [stderr] | [INFO] [stderr] 41 | if !arg.starts_with("-") { [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:71:22 [INFO] [stderr] | [INFO] [stderr] 71 | .ok_or(Error::new("Unable to parse filter property value"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Unable to parse filter property value"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/img/img_proc/img_proc_parser.rs:70:22 [INFO] [stderr] | [INFO] [stderr] 70 | .ok_or(Error::new("Missing filter property value"))? [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("Missing filter property value"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/yaml_helper.rs:134:25 [INFO] [stderr] | [INFO] [stderr] 134 | / Yaml::set_property_in( [INFO] [stderr] 135 | | map.get_mut(&key).unwrap(), [INFO] [stderr] 136 | | keys.next().unwrap_or(""), [INFO] [stderr] 137 | | value, [INFO] [stderr] 138 | | )? [INFO] [stderr] | |__________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unit_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 134 | () [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/yaml_helper.rs:144:20 [INFO] [stderr] | [INFO] [stderr] 144 | Ok(Yaml::set_property_in( [INFO] [stderr] | ____________________^ [INFO] [stderr] 145 | | map.get_mut(&key).unwrap(), [INFO] [stderr] 146 | | keys.next().unwrap_or(""), [INFO] [stderr] 147 | | value, [INFO] [stderr] 148 | | )?) [INFO] [stderr] | |__________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 144 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/main.rs:31:26 [INFO] [stderr] | [INFO] [stderr] 31 | ImgProcParser::parse("blur:sigma=3".into()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"blur:sigma=3"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/main.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | || env::home_dir(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `env::home_dir` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/main.rs:102:1 [INFO] [stderr] | [INFO] [stderr] 102 | / fn lock<'a>(config: &'a mut Config) -> Result<'a, ()> { [INFO] [stderr] 103 | | // Create a program intent [INFO] [stderr] 104 | | let mut intent = Intent::from(config)?; [INFO] [stderr] 105 | | [INFO] [stderr] ... | [INFO] [stderr] 130 | | Ok(()) [INFO] [stderr] 131 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:59:12 [INFO] [stderr] | [INFO] [stderr] 59 | if &filter == FILTER_NEAREST || &filter == FILTER_NEAREST_SHORT { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:59:41 [INFO] [stderr] | [INFO] [stderr] 59 | if &filter == FILTER_NEAREST || &filter == FILTER_NEAREST_SHORT { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:61:19 [INFO] [stderr] | [INFO] [stderr] 61 | } else if &filter == FILTER_TRIANGLE { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:114:5 [INFO] [stderr] | [INFO] [stderr] 114 | / match screenshot { [INFO] [stderr] 115 | | Ok(file) => { [INFO] [stderr] 116 | | intent.push_arg("--image".into()); [INFO] [stderr] 117 | | intent.push_arg(file.to_str().unwrap().into()); [INFO] [stderr] 118 | | }, [INFO] [stderr] 119 | | _ => {} [INFO] [stderr] 120 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 114 | if let Ok(file) = screenshot { [INFO] [stderr] 115 | intent.push_arg("--image".into()); [INFO] [stderr] 116 | intent.push_arg(file.to_str().unwrap().into()); [INFO] [stderr] 117 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:63:19 [INFO] [stderr] | [INFO] [stderr] 63 | } else if &filter == FILTER_CATMULLROM { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:65:19 [INFO] [stderr] | [INFO] [stderr] 65 | } else if &filter == FILTER_GAUSSIAN { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/img/img_proc/resize.rs:67:19 [INFO] [stderr] | [INFO] [stderr] 67 | } else if &filter == FILTER_LANCZOS3 { [INFO] [stderr] | -------^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `filter` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:161:14 [INFO] [stderr] | [INFO] [stderr] 161 | .ok_or(Error::new("The filter could not be read as a string"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("The filter could not be read as a string"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/main.rs:174:12 [INFO] [stderr] | [INFO] [stderr] 174 | if let Err(_) = edit.save(&img) { [INFO] [stderr] | _____- ^^^^^^ [INFO] [stderr] 175 | | return Err(Error::new("Failed to save image")); [INFO] [stderr] 176 | | } [INFO] [stderr] | |_____- help: try this: `if edit.save(&img).is_err()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/intent.rs:41:33 [INFO] [stderr] | [INFO] [stderr] 41 | if !arg.starts_with("-") { [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/yaml_helper.rs:134:25 [INFO] [stderr] | [INFO] [stderr] 134 | / Yaml::set_property_in( [INFO] [stderr] 135 | | map.get_mut(&key).unwrap(), [INFO] [stderr] 136 | | keys.next().unwrap_or(""), [INFO] [stderr] 137 | | value, [INFO] [stderr] 138 | | )? [INFO] [stderr] | |__________________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unit_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 134 | () [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> src/yaml_helper.rs:144:20 [INFO] [stderr] | [INFO] [stderr] 144 | Ok(Yaml::set_property_in( [INFO] [stderr] | ____________________^ [INFO] [stderr] 145 | | map.get_mut(&key).unwrap(), [INFO] [stderr] 146 | | keys.next().unwrap_or(""), [INFO] [stderr] 147 | | value, [INFO] [stderr] 148 | | )?) [INFO] [stderr] | |__________________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 144 | Ok(()) [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/main.rs:31:26 [INFO] [stderr] | [INFO] [stderr] 31 | ImgProcParser::parse("blur:sigma=3".into()).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `"blur:sigma=3"` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/main.rs:47:13 [INFO] [stderr] | [INFO] [stderr] 47 | || env::home_dir(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `env::home_dir` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/main.rs:102:1 [INFO] [stderr] | [INFO] [stderr] 102 | / fn lock<'a>(config: &'a mut Config) -> Result<'a, ()> { [INFO] [stderr] 103 | | // Create a program intent [INFO] [stderr] 104 | | let mut intent = Intent::from(config)?; [INFO] [stderr] 105 | | [INFO] [stderr] ... | [INFO] [stderr] 130 | | Ok(()) [INFO] [stderr] 131 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:114:5 [INFO] [stderr] | [INFO] [stderr] 114 | / match screenshot { [INFO] [stderr] 115 | | Ok(file) => { [INFO] [stderr] 116 | | intent.push_arg("--image".into()); [INFO] [stderr] 117 | | intent.push_arg(file.to_str().unwrap().into()); [INFO] [stderr] 118 | | }, [INFO] [stderr] 119 | | _ => {} [INFO] [stderr] 120 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 114 | if let Ok(file) = screenshot { [INFO] [stderr] 115 | intent.push_arg("--image".into()); [INFO] [stderr] 116 | intent.push_arg(file.to_str().unwrap().into()); [INFO] [stderr] 117 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/main.rs:161:14 [INFO] [stderr] | [INFO] [stderr] 161 | .ok_or(Error::new("The filter could not be read as a string"))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| Error::new("The filter could not be read as a string"))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_err()` [INFO] [stderr] --> src/main.rs:174:12 [INFO] [stderr] | [INFO] [stderr] 174 | if let Err(_) = edit.save(&img) { [INFO] [stderr] | _____- ^^^^^^ [INFO] [stderr] 175 | | return Err(Error::new("Failed to save image")); [INFO] [stderr] 176 | | } [INFO] [stderr] | |_____- help: try this: `if edit.save(&img).is_err()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 32.10s [INFO] running `"docker" "inspect" "b3f10ce5194607a4c64d8b44ccf14e0903e00bb5097a404a1000173e739edcef"` [INFO] running `"docker" "rm" "-f" "b3f10ce5194607a4c64d8b44ccf14e0903e00bb5097a404a1000173e739edcef"` [INFO] [stdout] b3f10ce5194607a4c64d8b44ccf14e0903e00bb5097a404a1000173e739edcef