[INFO] cloning repository https://github.com/jlgerber/swinstall_stack [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/jlgerber/swinstall_stack" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjlgerber%2Fswinstall_stack", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjlgerber%2Fswinstall_stack'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 41fea568b447b39fa0c909ace12bacebe59704fe [INFO] linting jlgerber/swinstall_stack against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fjlgerber%2Fswinstall_stack" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/jlgerber/swinstall_stack [INFO] finished tweaking git repo https://github.com/jlgerber/swinstall_stack [INFO] tweaked toml for git repo https://github.com/jlgerber/swinstall_stack written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/jlgerber/swinstall_stack on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/jlgerber/swinstall_stack already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded redox_syscall v0.1.49 [INFO] [stderr] Downloaded structopt v0.2.14 [INFO] [stderr] Downloaded structopt-derive v0.2.14 [INFO] [stderr] Downloaded quick-xml v0.13.1 [INFO] [stderr] Downloaded syn v0.15.23 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 1503368d19b03428c484ab6bc4fe58c64315f9e394c26e9ca820e2b7a908cb32 [INFO] running `Command { std: "docker" "start" "-a" "1503368d19b03428c484ab6bc4fe58c64315f9e394c26e9ca820e2b7a908cb32", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "1503368d19b03428c484ab6bc4fe58c64315f9e394c26e9ca820e2b7a908cb32", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1503368d19b03428c484ab6bc4fe58c64315f9e394c26e9ca820e2b7a908cb32", kill_on_drop: false }` [INFO] [stdout] 1503368d19b03428c484ab6bc4fe58c64315f9e394c26e9ca820e2b7a908cb32 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] f3b9322fb849c9ada130f28fa157c67f994c3e23ca025ff4147b043604245e55 [INFO] running `Command { std: "docker" "start" "-a" "f3b9322fb849c9ada130f28fa157c67f994c3e23ca025ff4147b043604245e55", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.45 [INFO] [stderr] Compiling proc-macro2 v0.4.24 [INFO] [stderr] Checking cfg-if v0.1.6 [INFO] [stderr] Compiling cc v1.0.28 [INFO] [stderr] Compiling autocfg v0.1.1 [INFO] [stderr] Compiling failure_derive v0.1.3 [INFO] [stderr] Compiling num-traits v0.2.6 [INFO] [stderr] Checking ucd-util v0.1.3 [INFO] [stderr] Compiling unicode-segmentation v1.2.1 [INFO] [stderr] Checking rustc-demangle v0.1.11 [INFO] [stderr] Compiling regex v1.1.0 [INFO] [stderr] Compiling num-integer v0.1.39 [INFO] [stderr] Compiling encoding_rs v0.8.13 [INFO] [stderr] Compiling memchr v2.1.2 [INFO] [stderr] Checking lazy_static v1.2.0 [INFO] [stderr] Checking utf8-ranges v1.0.2 [INFO] [stderr] Checking bitflags v1.0.4 [INFO] [stderr] Checking humantime v1.2.0 [INFO] [stderr] Checking thread_local v0.3.6 [INFO] [stderr] Checking termcolor v1.0.4 [INFO] [stderr] Checking log v0.4.6 [INFO] [stderr] Compiling backtrace v0.3.13 [INFO] [stderr] Checking regex-syntax v0.6.4 [INFO] [stderr] Compiling heck v0.3.1 [INFO] [stderr] Compiling quote v0.6.10 [INFO] [stderr] Checking atty v0.2.11 [INFO] [stderr] Checking time v0.1.41 [INFO] [stderr] Compiling backtrace-sys v0.1.28 [INFO] [stderr] Checking clap v2.32.0 [INFO] [stderr] Checking aho-corasick v0.6.9 [INFO] [stderr] Compiling syn v0.15.23 [INFO] [stderr] Checking chrono v0.4.6 [INFO] [stderr] Compiling synstructure v0.10.1 [INFO] [stderr] Checking env_logger v0.6.0 [INFO] [stderr] Compiling structopt-derive v0.2.14 [INFO] [stderr] Checking failure v0.1.3 [INFO] [stderr] Checking structopt v0.2.14 [INFO] [stderr] Checking quick-xml v0.13.1 [INFO] [stderr] Checking swinstall_stack v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `PathBuf` [INFO] [stdout] --> src/parser.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | path::{Path, PathBuf}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/constants.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | pub const DATETIME_FMT: &'static str = "%Y%m%d-%H%M%S"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/constants.rs:2:31 [INFO] [stdout] | [INFO] [stdout] 2 | pub const DEFAULT_LOG_LEVEL: &'static str = "warn"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/constants.rs:3:31 [INFO] [stdout] | [INFO] [stdout] 3 | pub const VERBOSE_LOG_LEVEL: &'static str = "debug"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PathBuf` [INFO] [stdout] --> src/parser.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | path::{Path, PathBuf}, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/constants.rs:1:26 [INFO] [stdout] | [INFO] [stdout] 1 | pub const DATETIME_FMT: &'static str = "%Y%m%d-%H%M%S"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/constants.rs:2:31 [INFO] [stdout] | [INFO] [stdout] 2 | pub const DEFAULT_LOG_LEVEL: &'static str = "warn"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/constants.rs:3:31 [INFO] [stdout] | [INFO] [stdout] 3 | pub const VERBOSE_LOG_LEVEL: &'static str = "debug"; [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/schemas/one.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 207 | / loop { [INFO] [stdout] 208 | | match reader.read_event(&mut buf) { [INFO] [stdout] 209 | | Ok(Event::Empty(ref e)) => { [INFO] [stdout] 210 | | in_empty = true; [INFO] [stdout] ... | [INFO] [stdout] 261 | | } [INFO] [stdout] | |_________- any code following this expression is unreachable [INFO] [stdout] 262 | Err(SwInstallError::NoCurrentFound)? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `in_empty` is never read [INFO] [stdout] --> src/schemas/one.rs:206:28 [INFO] [stdout] | [INFO] [stdout] 206 | let mut in_empty = false; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/schemas/one.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 207 | / loop { [INFO] [stdout] 208 | | match reader.read_event(&mut buf) { [INFO] [stdout] 209 | | Ok(Event::Empty(ref e)) => { [INFO] [stdout] 210 | | in_empty = true; [INFO] [stdout] ... | [INFO] [stdout] 261 | | } [INFO] [stdout] | |_________- any code following this expression is unreachable [INFO] [stdout] 262 | Err(SwInstallError::NoCurrentFound)? [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SwinstallParser` [INFO] [stdout] --> src/parser.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | SwinstallParser { [INFO] [stdout] 39 | | registry: SwinstallCurrentRegistry::new(), [INFO] [stdout] 40 | | default_schema: None [INFO] [stdout] 41 | | } [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 35 + impl Default for SwinstallParser { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/parser.rs:65:57 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn get_component(&self, schema: &str) -> Option<&Box>>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn SwinstallCurrent>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/parser.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | fn schema<'a>(&self, e: &'a BytesStart) -> Result { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 70 - fn schema<'a>(&self, e: &'a BytesStart) -> Result { [INFO] [stdout] 70 + fn schema(&self, e: &BytesStart) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/parser.rs:77:57 [INFO] [stdout] | [INFO] [stdout] 77 | schema = std::str::from_utf8(&attr.value.into_owned())?.to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser.rs:86:24 [INFO] [stdout] | [INFO] [stdout] 86 | fn current_version<'a>(&self, reader: &mut SwReader, schema: &str, datetime: &NaiveDateTime) -> Result { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reader` [INFO] [stdout] --> src/parser.rs:162:27 [INFO] [stdout] | [INFO] [stdout] 162 | fn current(&self, reader: &mut Reader) -> Result { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_reader` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser.rs:111:21 [INFO] [stdout] | [INFO] [stdout] 111 | / if e.name() == b"stack_history" { [INFO] [stdout] 112 | | // get schema version [INFO] [stdout] 113 | | let schema = self.schema(&e)?; [INFO] [stdout] ... | [INFO] [stdout] 121 | | return Ok(versioned_file); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ Ok(Event::Start(ref e)) [INFO] [stdout] 111 ~ if e.name() == b"stack_history" => { [INFO] [stdout] 112 | // get schema version [INFO] [stdout] ... [INFO] [stdout] 121 | return Ok(versioned_file); [INFO] [stdout] 122 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:113:50 [INFO] [stdout] | [INFO] [stdout] 113 | let schema = self.schema(&e)?; [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reader` [INFO] [stdout] --> src/parser.rs:167:30 [INFO] [stdout] | [INFO] [stdout] 167 | fn current_at(&self, reader: &mut Reader, datetime: &NaiveDateTime) [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_reader` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `datetime` [INFO] [stdout] --> src/parser.rs:167:70 [INFO] [stdout] | [INFO] [stdout] 167 | fn current_at(&self, reader: &mut Reader, datetime: &NaiveDateTime) [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_datetime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reader` [INFO] [stdout] --> src/parser.rs:186:27 [INFO] [stdout] | [INFO] [stdout] 186 | fn current(&self, reader: &mut Reader) -> Result { [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_reader` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `reader` [INFO] [stdout] --> src/parser.rs:191:30 [INFO] [stdout] | [INFO] [stdout] 191 | fn current_at(&self, reader: &mut Reader, datetime: &NaiveDateTime) [INFO] [stdout] | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_reader` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `datetime` [INFO] [stdout] --> src/parser.rs:191:70 [INFO] [stdout] | [INFO] [stdout] 191 | fn current_at(&self, reader: &mut Reader, datetime: &NaiveDateTime) [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_datetime` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/one.rs:114:65 [INFO] [stdout] | [INFO] [stdout] 114 | .ok_or(SwInstallError::MissingEltAttribute)? [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 115 | | .into_owned() [INFO] [stdout] | |_________________________________^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/one.rs:123:61 [INFO] [stdout] | [INFO] [stdout] 123 | .ok_or(SwInstallError::MissingEltAttribute)? [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 124 | | .into_owned() [INFO] [stdout] | |_____________________________^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `One` [INFO] [stdout] --> src/schemas/one.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | / pub fn new() -> Self { [INFO] [stdout] 187 | | One {} [INFO] [stdout] 188 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 185 + impl Default for One { [INFO] [stdout] 186 + fn default() -> Self { [INFO] [stdout] 187 + Self::new() [INFO] [stdout] 188 + } [INFO] [stdout] 189 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/schemas/one.rs:247:16 [INFO] [stdout] | [INFO] [stdout] 247 | if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if !(!in_empty || !current && in_datetime) { [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if (!in_datetime || current) && in_empty { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/schemas/one.rs:247:28 [INFO] [stdout] | [INFO] [stdout] 247 | if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if in_empty && !(!current && in_datetime) { [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if in_empty && current || !in_datetime { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `in_empty` is never read [INFO] [stdout] --> src/schemas/one.rs:206:28 [INFO] [stdout] | [INFO] [stdout] 206 | let mut in_empty = false; [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] = note: `#[warn(unused_assignments)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:95:74 [INFO] [stdout] | [INFO] [stdout] 95 | from_utf8(&action.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:96:76 [INFO] [stdout] | [INFO] [stdout] 96 | from_utf8(&datetime.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:97:72 [INFO] [stdout] | [INFO] [stdout] 97 | from_utf8(&hash.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:98:75 [INFO] [stdout] | [INFO] [stdout] 98 | from_utf8(&version.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Two` [INFO] [stdout] --> src/schemas/two.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | / pub fn new() -> Self { [INFO] [stdout] 139 | | Two {} [INFO] [stdout] 140 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 137 + impl Default for Two { [INFO] [stdout] 138 + fn default() -> Self { [INFO] [stdout] 139 + Self::new() [INFO] [stdout] 140 + } [INFO] [stdout] 141 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/schemas/two.rs:157:21 [INFO] [stdout] | [INFO] [stdout] 157 | / if e.name() == b"elt" { [INFO] [stdout] 158 | | debug!("Event::Empty - elt tag matched"); [INFO] [stdout] 159 | | let elt = Elt::from_attrs(e.attributes())?; [INFO] [stdout] 160 | | let dt = NaiveDateTime::parse_from_str(elt.datetime.as_str(), DATETIME_FMT)?; [INFO] [stdout] ... | [INFO] [stdout] 164 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 156 ~ Ok(Event::Empty(ref e)) [INFO] [stdout] 157 ~ if e.name() == b"elt" => { [INFO] [stdout] 158 | debug!("Event::Empty - elt tag matched"); [INFO] [stdout] ... [INFO] [stdout] 163 | } [INFO] [stdout] 164 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `SwinstallParser` [INFO] [stdout] --> src/parser.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | / pub fn new() -> Self { [INFO] [stdout] 38 | | SwinstallParser { [INFO] [stdout] 39 | | registry: SwinstallCurrentRegistry::new(), [INFO] [stdout] 40 | | default_schema: None [INFO] [stdout] 41 | | } [INFO] [stdout] 42 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 35 + impl Default for SwinstallParser { [INFO] [stdout] 36 + fn default() -> Self { [INFO] [stdout] 37 + Self::new() [INFO] [stdout] 38 + } [INFO] [stdout] 39 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `&Box`. Consider using just `&T` [INFO] [stdout] --> src/parser.rs:65:57 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn get_component(&self, schema: &str) -> Option<&Box>>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&dyn SwinstallCurrent>` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrowed_box [INFO] [stdout] = note: `#[warn(clippy::borrowed_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/parser.rs:70:15 [INFO] [stdout] | [INFO] [stdout] 70 | fn schema<'a>(&self, e: &'a BytesStart) -> Result { [INFO] [stdout] | ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 70 - fn schema<'a>(&self, e: &'a BytesStart) -> Result { [INFO] [stdout] 70 + fn schema(&self, e: &BytesStart) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/parser.rs:77:57 [INFO] [stdout] | [INFO] [stdout] 77 | schema = std::str::from_utf8(&attr.value.into_owned())?.to_string(); [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] = note: `#[warn(clippy::unnecessary_to_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this lifetime isn't used in the function definition [INFO] [stdout] --> src/parser.rs:86:24 [INFO] [stdout] | [INFO] [stdout] 86 | fn current_version<'a>(&self, reader: &mut SwReader, schema: &str, datetime: &NaiveDateTime) -> Result { [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes [INFO] [stdout] = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/errors.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | #[derive(Debug, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Fail` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_Fail_FOR_SwInstallError` [INFO] [stdout] 10 | pub enum SwInstallError { [INFO] [stdout] | -------------- `SwInstallError` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/errors.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | #[derive(Debug, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Display` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_core_fmt_Display_FOR_SwInstallError` [INFO] [stdout] 10 | pub enum SwInstallError { [INFO] [stdout] | -------------- `SwInstallError` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/parser.rs:111:21 [INFO] [stdout] | [INFO] [stdout] 111 | / if e.name() == b"stack_history" { [INFO] [stdout] 112 | | // get schema version [INFO] [stdout] 113 | | let schema = self.schema(&e)?; [INFO] [stdout] ... | [INFO] [stdout] 121 | | return Ok(versioned_file); [INFO] [stdout] 122 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 110 ~ Ok(Event::Start(ref e)) [INFO] [stdout] 111 ~ if e.name() == b"stack_history" => { [INFO] [stdout] 112 | // get schema version [INFO] [stdout] ... [INFO] [stdout] 121 | return Ok(versioned_file); [INFO] [stdout] 122 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/parser.rs:113:50 [INFO] [stdout] | [INFO] [stdout] 113 | let schema = self.schema(&e)?; [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/one.rs:114:65 [INFO] [stdout] | [INFO] [stdout] 114 | .ok_or(SwInstallError::MissingEltAttribute)? [INFO] [stdout] | _________________________________________________________________^ [INFO] [stdout] 115 | | .into_owned() [INFO] [stdout] | |_________________________________^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/one.rs:123:61 [INFO] [stdout] | [INFO] [stdout] 123 | .ok_or(SwInstallError::MissingEltAttribute)? [INFO] [stdout] | _____________________________________________________________^ [INFO] [stdout] 124 | | .into_owned() [INFO] [stdout] | |_____________________________^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/schemas/one.rs:143:13 [INFO] [stdout] | [INFO] [stdout] 143 | / match reader.read_event(&mut buf) { [INFO] [stdout] 144 | | Ok(Event::Empty(ref e)) => { [INFO] [stdout] 145 | | let elt = Elt::from_attrs(e.attributes()).expect("could not create elt"); [INFO] [stdout] 146 | | let expected = Elt { [INFO] [stdout] ... | [INFO] [stdout] 154 | | _ => {} [INFO] [stdout] 155 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 143 ~ if let Ok(Event::Empty(ref e)) = reader.read_event(&mut buf) { [INFO] [stdout] 144 + let elt = Elt::from_attrs(e.attributes()).expect("could not create elt"); [INFO] [stdout] 145 + let expected = Elt { [INFO] [stdout] 146 + is_current: true, [INFO] [stdout] 147 + version: "20161213-093146".to_string(), [INFO] [stdout] 148 + revision: None [INFO] [stdout] 149 + }; [INFO] [stdout] 150 + assert_eq!(elt, expected); [INFO] [stdout] 151 + break; [INFO] [stdout] 152 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/schemas/one.rs:165:13 [INFO] [stdout] | [INFO] [stdout] 165 | / match reader.read_event(&mut buf) { [INFO] [stdout] 166 | | Ok(Event::Empty(ref e)) => { [INFO] [stdout] 167 | | let elt = Elt::from_attrs(e.attributes()).expect("could not create elt"); [INFO] [stdout] 168 | | let expected = Elt { [INFO] [stdout] ... | [INFO] [stdout] 176 | | _ => {} [INFO] [stdout] 177 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 165 ~ if let Ok(Event::Empty(ref e)) = reader.read_event(&mut buf) { [INFO] [stdout] 166 + let elt = Elt::from_attrs(e.attributes()).expect("could not create elt"); [INFO] [stdout] 167 + let expected = Elt { [INFO] [stdout] 168 + is_current: true, [INFO] [stdout] 169 + version: "20161213-093146".to_string(), [INFO] [stdout] 170 + revision: Some("r575055".to_string()) [INFO] [stdout] 171 + }; [INFO] [stdout] 172 + assert_eq!(elt, expected); [INFO] [stdout] 173 + break; [INFO] [stdout] 174 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `One` [INFO] [stdout] --> src/schemas/one.rs:186:5 [INFO] [stdout] | [INFO] [stdout] 186 | / pub fn new() -> Self { [INFO] [stdout] 187 | | One {} [INFO] [stdout] 188 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 185 + impl Default for One { [INFO] [stdout] 186 + fn default() -> Self { [INFO] [stdout] 187 + Self::new() [INFO] [stdout] 188 + } [INFO] [stdout] 189 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/schemas/one.rs:247:16 [INFO] [stdout] | [INFO] [stdout] 247 | if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if !(!in_empty || !current && in_datetime) { [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if (!in_datetime || current) && in_empty { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/schemas/one.rs:247:28 [INFO] [stdout] | [INFO] [stdout] 247 | if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if in_empty && !(!current && in_datetime) { [INFO] [stdout] | [INFO] [stdout] 247 - if in_empty && ((current && in_datetime) || !in_datetime) { [INFO] [stdout] 247 + if in_empty && current || !in_datetime { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:95:74 [INFO] [stdout] | [INFO] [stdout] 95 | from_utf8(&action.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:96:76 [INFO] [stdout] | [INFO] [stdout] 96 | from_utf8(&datetime.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:97:72 [INFO] [stdout] | [INFO] [stdout] 97 | from_utf8(&hash.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `into_owned` [INFO] [stdout] --> src/schemas/two.rs:98:75 [INFO] [stdout] | [INFO] [stdout] 98 | from_utf8(&version.ok_or(SwInstallError::MissingEltAttribute)?.into_owned())?.to_string(), [INFO] [stdout] | ^^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_to_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/schemas/two.rs:114:13 [INFO] [stdout] | [INFO] [stdout] 114 | / match reader.read_event(&mut buf) { [INFO] [stdout] 115 | | Ok(Event::Empty(ref e)) => { [INFO] [stdout] 116 | | let elt = Elt::from_attrs(e.attributes()).expect("could not create elt"); [INFO] [stdout] 117 | | let expected = Elt { [INFO] [stdout] ... | [INFO] [stdout] 127 | | _ => {} [INFO] [stdout] 128 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 114 ~ if let Ok(Event::Empty(ref e)) = reader.read_event(&mut buf) { [INFO] [stdout] 115 + let elt = Elt::from_attrs(e.attributes()).expect("could not create elt"); [INFO] [stdout] 116 + let expected = Elt { [INFO] [stdout] 117 + action: String::from("install"), [INFO] [stdout] 118 + datetime: "20180702-144204".to_string(), [INFO] [stdout] 119 + hash: String::from("194f835569a79ba433"), [INFO] [stdout] 120 + version: "3".to_string(), [INFO] [stdout] 121 + }; [INFO] [stdout] 122 + [INFO] [stdout] 123 + assert_eq!(elt, expected); [INFO] [stdout] 124 + break; [INFO] [stdout] 125 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Two` [INFO] [stdout] --> src/schemas/two.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | / pub fn new() -> Self { [INFO] [stdout] 139 | | Two {} [INFO] [stdout] 140 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 137 + impl Default for Two { [INFO] [stdout] 138 + fn default() -> Self { [INFO] [stdout] 139 + Self::new() [INFO] [stdout] 140 + } [INFO] [stdout] 141 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/schemas/two.rs:157:21 [INFO] [stdout] | [INFO] [stdout] 157 | / if e.name() == b"elt" { [INFO] [stdout] 158 | | debug!("Event::Empty - elt tag matched"); [INFO] [stdout] 159 | | let elt = Elt::from_attrs(e.attributes())?; [INFO] [stdout] 160 | | let dt = NaiveDateTime::parse_from_str(elt.datetime.as_str(), DATETIME_FMT)?; [INFO] [stdout] ... | [INFO] [stdout] 164 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 156 ~ Ok(Event::Empty(ref e)) [INFO] [stdout] 157 ~ if e.name() == b"elt" => { [INFO] [stdout] 158 | debug!("Event::Empty - elt tag matched"); [INFO] [stdout] ... [INFO] [stdout] 163 | } [INFO] [stdout] 164 ~ }, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/errors.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | #[derive(Debug, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Fail` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_Fail_FOR_SwInstallError` [INFO] [stdout] 10 | pub enum SwInstallError { [INFO] [stdout] | -------------- `SwInstallError` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/errors.rs:9:17 [INFO] [stdout] | [INFO] [stdout] 9 | #[derive(Debug, Fail)] [INFO] [stdout] | ^--- [INFO] [stdout] | | [INFO] [stdout] | `Display` is not local [INFO] [stdout] | move the `impl` block outside of this constant `_DERIVE_failure_core_fmt_Display_FOR_SwInstallError` [INFO] [stdout] 10 | pub enum SwInstallError { [INFO] [stdout] | -------------- `SwInstallError` is not local [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `Fail` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `Fail` may come from an old version of the `failure_derive` crate, try updating your dependency with `cargo update -p failure_derive` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: items in an anonymous const item (`const _: () = { ... }`) are treated as in the same scope as the anonymous const's declaration for the purpose of this lint [INFO] [stdout] = note: this warning originates in the derive macro `Fail` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 7.86s [INFO] [stderr] warning: the following packages contain code that will be rejected by a future version of Rust: quick-xml v0.13.1 [INFO] [stderr] note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 3` [INFO] running `Command { std: "docker" "inspect" "f3b9322fb849c9ada130f28fa157c67f994c3e23ca025ff4147b043604245e55", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "f3b9322fb849c9ada130f28fa157c67f994c3e23ca025ff4147b043604245e55", kill_on_drop: false }` [INFO] [stdout] f3b9322fb849c9ada130f28fa157c67f994c3e23ca025ff4147b043604245e55