[INFO] fetching crate tree-rizzen-yazston 0.4.0... [INFO] linting tree-rizzen-yazston-0.4.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate tree-rizzen-yazston 0.4.0 into /workspace/builds/worker-7-tc1/source [INFO] started tweaking crates.io crate tree-rizzen-yazston 0.4.0 [INFO] finished tweaking crates.io crate tree-rizzen-yazston 0.4.0 [INFO] tweaked toml for crates.io crate tree-rizzen-yazston 0.4.0 written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate tree-rizzen-yazston 0.4.0 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] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 17082c886f35cbd069f5200767f5f0738d7cd3e690934fdb77fcbfba94a0f271 [INFO] running `Command { std: "docker" "start" "-a" "17082c886f35cbd069f5200767f5f0738d7cd3e690934fdb77fcbfba94a0f271", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "17082c886f35cbd069f5200767f5f0738d7cd3e690934fdb77fcbfba94a0f271", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "17082c886f35cbd069f5200767f5f0738d7cd3e690934fdb77fcbfba94a0f271", kill_on_drop: false }` [INFO] [stdout] 17082c886f35cbd069f5200767f5f0738d7cd3e690934fdb77fcbfba94a0f271 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 3fa739e1e8ca9b290bf951ccf6fa5d9bf5fa099694380d925bbf9546e9e24b99 [INFO] running `Command { std: "docker" "start" "-a" "3fa739e1e8ca9b290bf951ccf6fa5d9bf5fa099694380d925bbf9546e9e24b99", kill_on_drop: false }` [INFO] [stderr] Checking tree-rizzen-yazston v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Tree` [INFO] [stdout] --> src/tree.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn new() -> Self { [INFO] [stdout] 45 | | Tree { [INFO] [stdout] 46 | | nodes: Vec::new(), [INFO] [stdout] 47 | | root: None [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | } [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] 29 + impl Default for Tree { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | if !self.root.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.root.is_some()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | if !self.root.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.root.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:264:16 [INFO] [stdout] | [INFO] [stdout] 264 | if !_parent.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `_parent.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `_parent` after checking its variant with `is_none` [INFO] [stdout] --> src/tree.rs:265:30 [INFO] [stdout] | [INFO] [stdout] 264 | if !_parent.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 265 | let parent = _parent.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:316:16 [INFO] [stdout] | [INFO] [stdout] 316 | if !_parent.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `_parent.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `_parent` after checking its variant with `is_none` [INFO] [stdout] --> src/tree.rs:317:30 [INFO] [stdout] | [INFO] [stdout] 316 | if !_parent.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 317 | let parent = _parent.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [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/tree.rs:402:9 [INFO] [stdout] | [INFO] [stdout] 402 | / match self.is_ancestor_of( destination, source ) { [INFO] [stdout] 403 | | Ok( _ ) => return Err( TreeError::IsAncestorOf( source, destination ) ), [INFO] [stdout] 404 | | Err( _ ) => {} [INFO] [stdout] 405 | | }; [INFO] [stdout] | |_________^ help: try: `if let Ok( _ ) = self.is_ancestor_of( destination, source ) { return Err( TreeError::IsAncestorOf( source, destination ) ) }` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/tree.rs:490:13 [INFO] [stdout] | [INFO] [stdout] 490 | / if let Some( _ ) = option { [INFO] [stdout] 491 | | return true; [INFO] [stdout] 492 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/tree.rs:489:22 [INFO] [stdout] | [INFO] [stdout] 489 | if let Some( option ) = self.nodes.get( node_index ) { [INFO] [stdout] | ^^^^^^ replace this binding [INFO] [stdout] 490 | if let Some( _ ) = option { [INFO] [stdout] | ^^^^^^^^^ with this pattern [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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/tree.rs:490:20 [INFO] [stdout] | [INFO] [stdout] 490 | if let Some( _ ) = option { [INFO] [stdout] | -------^^^^^^^^^--------- help: try: `if option.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/tree.rs:592:9 [INFO] [stdout] | [INFO] [stdout] 592 | Ok( self.is_ancestor_of( parent, is_ancestor )? ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 592 - Ok( self.is_ancestor_of( parent, is_ancestor )? ) [INFO] [stdout] 592 + self.is_ancestor_of( parent, is_ancestor ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tree.rs:615:13 [INFO] [stdout] | [INFO] [stdout] 615 | Ok( &index_node.children.as_ref().unwrap() ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `index_node.children.as_ref().unwrap()` [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: struct `Tree` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/tree.rs:733:5 [INFO] [stdout] | [INFO] [stdout] 733 | pub fn len( &self ) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tree.rs:808:13 [INFO] [stdout] | [INFO] [stdout] 808 | Ok( &index_node.data.as_ref().unwrap() ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `index_node.data.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/tree.rs:835:13 [INFO] [stdout] | [INFO] [stdout] 835 | / if let Some( node ) = option { [INFO] [stdout] 836 | | return Some( node ); [INFO] [stdout] 837 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/tree.rs:834:22 [INFO] [stdout] | [INFO] [stdout] 834 | if let Some( option ) = self.nodes.get( node_index ) { [INFO] [stdout] | ^^^^^^ replace this binding [INFO] [stdout] 835 | if let Some( node ) = option { [INFO] [stdout] | ^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/tree.rs:844:13 [INFO] [stdout] | [INFO] [stdout] 844 | / if let Some( node ) = option { [INFO] [stdout] 845 | | return Some( node ); [INFO] [stdout] 846 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/tree.rs:843:22 [INFO] [stdout] | [INFO] [stdout] 843 | if let Some( option ) = self.nodes.get_mut( node_index ) { [INFO] [stdout] | ^^^^^^ replace this binding [INFO] [stdout] 844 | if let Some( node ) = option { [INFO] [stdout] | ^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `Tree` [INFO] [stdout] --> src/tree.rs:44:5 [INFO] [stdout] | [INFO] [stdout] 44 | / pub fn new() -> Self { [INFO] [stdout] 45 | | Tree { [INFO] [stdout] 46 | | nodes: Vec::new(), [INFO] [stdout] 47 | | root: None [INFO] [stdout] 48 | | } [INFO] [stdout] 49 | | } [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] 29 + impl Default for Tree { [INFO] [stdout] 30 + fn default() -> Self { [INFO] [stdout] 31 + Self::new() [INFO] [stdout] 32 + } [INFO] [stdout] 33 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | if !self.root.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.root.is_some()` [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] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:177:12 [INFO] [stdout] | [INFO] [stdout] 177 | if !self.root.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `self.root.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:264:16 [INFO] [stdout] | [INFO] [stdout] 264 | if !_parent.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `_parent.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `_parent` after checking its variant with `is_none` [INFO] [stdout] --> src/tree.rs:265:30 [INFO] [stdout] | [INFO] [stdout] 264 | if !_parent.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 265 | let parent = _parent.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/tree.rs:316:16 [INFO] [stdout] | [INFO] [stdout] 316 | if !_parent.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try: `_parent.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `_parent` after checking its variant with `is_none` [INFO] [stdout] --> src/tree.rs:317:30 [INFO] [stdout] | [INFO] [stdout] 316 | if !_parent.is_none() { [INFO] [stdout] | ----------------- the check is happening here [INFO] [stdout] 317 | let parent = _parent.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [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/tree.rs:402:9 [INFO] [stdout] | [INFO] [stdout] 402 | / match self.is_ancestor_of( destination, source ) { [INFO] [stdout] 403 | | Ok( _ ) => return Err( TreeError::IsAncestorOf( source, destination ) ), [INFO] [stdout] 404 | | Err( _ ) => {} [INFO] [stdout] 405 | | }; [INFO] [stdout] | |_________^ help: try: `if let Ok( _ ) = self.is_ancestor_of( destination, source ) { return Err( TreeError::IsAncestorOf( source, destination ) ) }` [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] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/tree.rs:490:13 [INFO] [stdout] | [INFO] [stdout] 490 | / if let Some( _ ) = option { [INFO] [stdout] 491 | | return true; [INFO] [stdout] 492 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/tree.rs:489:22 [INFO] [stdout] | [INFO] [stdout] 489 | if let Some( option ) = self.nodes.get( node_index ) { [INFO] [stdout] | ^^^^^^ replace this binding [INFO] [stdout] 490 | if let Some( _ ) = option { [INFO] [stdout] | ^^^^^^^^^ with this pattern [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] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/tree.rs:490:20 [INFO] [stdout] | [INFO] [stdout] 490 | if let Some( _ ) = option { [INFO] [stdout] | -------^^^^^^^^^--------- help: try: `if option.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/tree.rs:592:9 [INFO] [stdout] | [INFO] [stdout] 592 | Ok( self.is_ancestor_of( parent, is_ancestor )? ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 592 - Ok( self.is_ancestor_of( parent, is_ancestor )? ) [INFO] [stdout] 592 + self.is_ancestor_of( parent, is_ancestor ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tree.rs:615:13 [INFO] [stdout] | [INFO] [stdout] 615 | Ok( &index_node.children.as_ref().unwrap() ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `index_node.children.as_ref().unwrap()` [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: struct `Tree` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/tree.rs:733:5 [INFO] [stdout] | [INFO] [stdout] 733 | pub fn len( &self ) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/tree.rs:808:13 [INFO] [stdout] | [INFO] [stdout] 808 | Ok( &index_node.data.as_ref().unwrap() ) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `index_node.data.as_ref().unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/tree.rs:835:13 [INFO] [stdout] | [INFO] [stdout] 835 | / if let Some( node ) = option { [INFO] [stdout] 836 | | return Some( node ); [INFO] [stdout] 837 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/tree.rs:834:22 [INFO] [stdout] | [INFO] [stdout] 834 | if let Some( option ) = self.nodes.get( node_index ) { [INFO] [stdout] | ^^^^^^ replace this binding [INFO] [stdout] 835 | if let Some( node ) = option { [INFO] [stdout] | ^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/tree.rs:844:13 [INFO] [stdout] | [INFO] [stdout] 844 | / if let Some( node ) = option { [INFO] [stdout] 845 | | return Some( node ); [INFO] [stdout] 846 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/tree.rs:843:22 [INFO] [stdout] | [INFO] [stdout] 843 | if let Some( option ) = self.nodes.get_mut( node_index ) { [INFO] [stdout] | ^^^^^^ replace this binding [INFO] [stdout] 844 | if let Some( node ) = option { [INFO] [stdout] | ^^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [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] --> tests/tree.rs:171:5 [INFO] [stdout] | [INFO] [stdout] 171 | / match tree.parent( 0 ).err().unwrap() { [INFO] [stdout] 172 | | TreeError::RootHasNoParent( _ ) => result = true, [INFO] [stdout] 173 | | _ => {} [INFO] [stdout] 174 | | }; [INFO] [stdout] | |_____^ help: try: `if let TreeError::RootHasNoParent( _ ) = tree.parent( 0 ).err().unwrap() { result = true }` [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] [INFO] [stdout] [INFO] [stdout] warning: accessing first element with `data_vec_ref.get(0)` [INFO] [stdout] --> tests/tree.rs:307:16 [INFO] [stdout] | [INFO] [stdout] 307 | let data = data_vec_ref.get( 0 ).unwrap().downcast_ref::().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `data_vec_ref.first()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first [INFO] [stdout] = note: `#[warn(clippy::get_first)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.74s [INFO] running `Command { std: "docker" "inspect" "3fa739e1e8ca9b290bf951ccf6fa5d9bf5fa099694380d925bbf9546e9e24b99", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "3fa739e1e8ca9b290bf951ccf6fa5d9bf5fa099694380d925bbf9546e9e24b99", kill_on_drop: false }` [INFO] [stdout] 3fa739e1e8ca9b290bf951ccf6fa5d9bf5fa099694380d925bbf9546e9e24b99