[INFO] updating cached repository rookwood101/blocksworld_solver [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/rookwood101/blocksworld_solver [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/rookwood101/blocksworld_solver" "work/ex/clippy-test-run/sources/stable/gh/rookwood101/blocksworld_solver"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/rookwood101/blocksworld_solver'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/rookwood101/blocksworld_solver" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rookwood101/blocksworld_solver"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rookwood101/blocksworld_solver'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 625cca7c82e6d72c16742e25e11b0362ec8bec92 [INFO] sha for GitHub repo rookwood101/blocksworld_solver: 625cca7c82e6d72c16742e25e11b0362ec8bec92 [INFO] validating manifest of rookwood101/blocksworld_solver 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 rookwood101/blocksworld_solver 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 rookwood101/blocksworld_solver [INFO] finished frobbing rookwood101/blocksworld_solver [INFO] frobbed toml for rookwood101/blocksworld_solver written to work/ex/clippy-test-run/sources/stable/gh/rookwood101/blocksworld_solver/Cargo.toml [INFO] started frobbing rookwood101/blocksworld_solver [INFO] finished frobbing rookwood101/blocksworld_solver [INFO] frobbed toml for rookwood101/blocksworld_solver written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rookwood101/blocksworld_solver/Cargo.toml [INFO] crate rookwood101/blocksworld_solver 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 rookwood101/blocksworld_solver against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/rookwood101/blocksworld_solver:/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] a998b6e089fc2d69e2f95dc63f65599c4cb9f999e50a30f7a7cc1ee143e0ebd5 [INFO] running `"docker" "start" "-a" "a998b6e089fc2d69e2f95dc63f65599c4cb9f999e50a30f7a7cc1ee143e0ebd5"` [INFO] [stderr] Checking bidir-map v0.3.0 [INFO] [stderr] Checking blocksworld_solver v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | width: width, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | height: height, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/blocksworld/world.rs:48:13 [INFO] [stderr] | [INFO] [stderr] 48 | print!("{}\n", wall_char); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:178:20 [INFO] [stderr] | [INFO] [stderr] 178 | Location { x: x, y: y } [INFO] [stderr] | ^^^^ help: replace it with: `x` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:178:26 [INFO] [stderr] | [INFO] [stderr] 178 | Location { x: x, y: y } [INFO] [stderr] | ^^^^ help: replace it with: `y` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/breadth_first_searcher.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/breadth_first_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/depth_first_searcher.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/depth_first_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/iterative_deepening_searcher.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/iterative_deepening_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:94:13 [INFO] [stderr] | [INFO] [stderr] 94 | depth: depth, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `depth` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:95:13 [INFO] [stderr] | [INFO] [stderr] 95 | world: world, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:96:13 [INFO] [stderr] | [INFO] [stderr] 96 | parent: parent, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:97:13 [INFO] [stderr] | [INFO] [stderr] 97 | start_to_self_cost: start_to_self_cost, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_to_self_cost` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:98:13 [INFO] [stderr] | [INFO] [stderr] 98 | heuristic: heuristic, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heuristic` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/mod.rs:115:13 [INFO] [stderr] | [INFO] [stderr] 115 | depth: depth, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `depth` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/mod.rs:116:13 [INFO] [stderr] | [INFO] [stderr] 116 | world: world, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/mod.rs:117:13 [INFO] [stderr] | [INFO] [stderr] 117 | parent: parent, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | max_difficulty: max_difficulty, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_difficulty` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:23:13 [INFO] [stderr] | [INFO] [stderr] 23 | width: width, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | height: height, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: using `print!()` with a format string that ends in a single newline, consider using `println!()` instead [INFO] [stderr] --> src/blocksworld/world.rs:48:13 [INFO] [stderr] | [INFO] [stderr] 48 | print!("{}\n", wall_char); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::print_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#print_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:178:20 [INFO] [stderr] | [INFO] [stderr] 178 | Location { x: x, y: y } [INFO] [stderr] | ^^^^ help: replace it with: `x` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/world.rs:178:26 [INFO] [stderr] | [INFO] [stderr] 178 | Location { x: x, y: y } [INFO] [stderr] | ^^^^ help: replace it with: `y` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/breadth_first_searcher.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/breadth_first_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/depth_first_searcher.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/depth_first_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/iterative_deepening_searcher.rs:17:13 [INFO] [stderr] | [INFO] [stderr] 17 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/iterative_deepening_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:18:13 [INFO] [stderr] | [INFO] [stderr] 18 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:19:13 [INFO] [stderr] | [INFO] [stderr] 19 | goal_world: goal_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `goal_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:94:13 [INFO] [stderr] | [INFO] [stderr] 94 | depth: depth, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `depth` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:95:13 [INFO] [stderr] | [INFO] [stderr] 95 | world: world, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:96:13 [INFO] [stderr] | [INFO] [stderr] 96 | parent: parent, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:97:13 [INFO] [stderr] | [INFO] [stderr] 97 | start_to_self_cost: start_to_self_cost, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_to_self_cost` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:98:13 [INFO] [stderr] | [INFO] [stderr] 98 | heuristic: heuristic, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `heuristic` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/mod.rs:115:13 [INFO] [stderr] | [INFO] [stderr] 115 | depth: depth, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `depth` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/mod.rs:116:13 [INFO] [stderr] | [INFO] [stderr] 116 | world: world, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/search/mod.rs:117:13 [INFO] [stderr] | [INFO] [stderr] 117 | parent: parent, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `parent` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | start_world: start_world, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `start_world` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:27:13 [INFO] [stderr] | [INFO] [stderr] 27 | max_difficulty: max_difficulty, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `max_difficulty` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: unused import: `blocksworld::search::Node` [INFO] [stderr] --> src/blocksworld/test/mod.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | use blocksworld::search::Node; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `blocksworld::test::test` [INFO] [stderr] --> src/main.rs:10:5 [INFO] [stderr] | [INFO] [stderr] 10 | use blocksworld::test::test; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `blocksworld::search::Node` [INFO] [stderr] --> src/blocksworld/test/mod.rs:8:5 [INFO] [stderr] | [INFO] [stderr] 8 | use blocksworld::search::Node; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `blocksworld::test::test` [INFO] [stderr] --> src/main.rs:10:5 [INFO] [stderr] | [INFO] [stderr] 10 | use blocksworld::test::test; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `blocksworld::search::Searcher` [INFO] [stderr] --> src/blocksworld/test/mod.rs:7:5 [INFO] [stderr] | [INFO] [stderr] 7 | use blocksworld::search::Searcher; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `latex_print` [INFO] [stderr] --> src/blocksworld/world.rs:52:5 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn latex_print(&self) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: function is never used: `solution_depth_difficulty` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:9:1 [INFO] [stderr] | [INFO] [stderr] 9 | pub fn solution_depth_difficulty(goal_world: World) -> Vec<(u8, World)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct is never constructed: `SolutionDepthSearcher` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:16:1 [INFO] [stderr] | [INFO] [stderr] 16 | pub struct SolutionDepthSearcher { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `new` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:23:5 [INFO] [stderr] | [INFO] [stderr] 23 | pub fn new(start_world: World, max_difficulty: u8) -> SolutionDepthSearcher { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `search` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:31:5 [INFO] [stderr] | [INFO] [stderr] 31 | pub fn search(mut self) -> Vec<(u8, World)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `grid_size_difficulty` [INFO] [stderr] --> src/blocksworld/test/problem_generators/grid_size_difficulty.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | fn grid_size_difficulty() {} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `test` [INFO] [stderr] --> src/blocksworld/test/mod.rs:16:1 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn test() { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `run_all_searchers_average` [INFO] [stderr] --> src/blocksworld/test/mod.rs:39:1 [INFO] [stderr] | [INFO] [stderr] 39 | fn run_all_searchers_average(start_world: &World, goal_world: &World, difficulty: u8) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: unused import: `blocksworld::search::Searcher` [INFO] [stderr] --> src/blocksworld/test/mod.rs:7:5 [INFO] [stderr] | [INFO] [stderr] 7 | use blocksworld::search::Searcher; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/blocksworld/world.rs:78:51 [INFO] [stderr] | [INFO] [stderr] 78 | pub fn clone_and_move_agent(&self, direction: &Direction) -> Result { [INFO] [stderr] | ^^^^^^^^^^ help: consider passing by value instead: `Direction` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/blocksworld/world.rs:108:12 [INFO] [stderr] | [INFO] [stderr] 108 | Ok(self.entities.get_by_second(location).map(|ent| ent.clone()).unwrap_or(Entity::None)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `self.entities.get_by_second(location).cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [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/blocksworld/world.rs:146:13 [INFO] [stderr] | [INFO] [stderr] 146 | / match *entity { [INFO] [stderr] 147 | | Entity::Agent => agent_count += 1, [INFO] [stderr] 148 | | _ => (), [INFO] [stderr] 149 | | } [INFO] [stderr] | |_____________^ help: try this: `if let Entity::Agent = *entity { agent_count += 1 }` [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] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/blocksworld/world.rs:196:9 [INFO] [stderr] | [INFO] [stderr] 196 | DIRECTIONS.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `DIRECTIONS` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:70:34 [INFO] [stderr] | [INFO] [stderr] 70 | let start_to_self_cost = match &parent { // Each node is only 1 move away from its parent. [INFO] [stderr] | __________________________________^ [INFO] [stderr] 71 | | &Some(ref parent_rc) => parent_rc.start_to_self_cost + 1, [INFO] [stderr] 72 | | &None => 0, [INFO] [stderr] 73 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 70 | let start_to_self_cost = match parent { // Each node is only 1 move away from its parent. [INFO] [stderr] 71 | Some(ref parent_rc) => parent_rc.start_to_self_cost + 1, [INFO] [stderr] 72 | None => 0, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:110:9 [INFO] [stderr] | [INFO] [stderr] 110 | / match &self.parent { [INFO] [stderr] 111 | | &Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 112 | | &None => None, [INFO] [stderr] 113 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 110 | match self.parent { [INFO] [stderr] 111 | Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 112 | None => None, [INFO] [stderr] | [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/blocksworld/search/mod.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | / match max_depth { [INFO] [stderr] 42 | | Some(max_depth) => { [INFO] [stderr] 43 | | if child_depth > max_depth { [INFO] [stderr] 44 | | continue; [INFO] [stderr] ... | [INFO] [stderr] 47 | | None => (), [INFO] [stderr] 48 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [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] 41 | if let Some(max_depth) = max_depth { [INFO] [stderr] 42 | if child_depth > max_depth { [INFO] [stderr] 43 | continue; [INFO] [stderr] 44 | } [INFO] [stderr] 45 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `while let` loop [INFO] [stderr] --> src/blocksworld/search/mod.rs:93:9 [INFO] [stderr] | [INFO] [stderr] 93 | / loop { [INFO] [stderr] 94 | | match parent { [INFO] [stderr] 95 | | Some(node_rc) => { [INFO] [stderr] 96 | | node_rc.get_world().pretty_print(); [INFO] [stderr] ... | [INFO] [stderr] 101 | | } [INFO] [stderr] 102 | | } [INFO] [stderr] | |_________^ help: try: `while let Some(node_rc) = parent { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/blocksworld/search/mod.rs:129:9 [INFO] [stderr] | [INFO] [stderr] 129 | / match &self.parent { [INFO] [stderr] 130 | | &Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 131 | | &None => None, [INFO] [stderr] 132 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 129 | match self.parent { [INFO] [stderr] 130 | Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 131 | None => None, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: usage of `contains_key` followed by `insert` on a `BTreeMap` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:60:9 [INFO] [stderr] | [INFO] [stderr] 60 | / if !self.solutions.contains_key(&(result.0.get_depth() as u8)) { [INFO] [stderr] 61 | | self.solutions.insert(result.0.get_depth() as u8, node.get_world().clone()); [INFO] [stderr] 62 | | println!("New solution, depth {}", result.0.get_depth()); [INFO] [stderr] 63 | | } [INFO] [stderr] | |_________^ help: consider using: `self.solutions.entry(result.0.get_depth() as u8)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_entry)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/blocksworld/test/mod.rs:45:16 [INFO] [stderr] | [INFO] [stderr] 45 | for run in 0..(try_runs + 1) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: use: `0..=try_runs` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] warning: method is never used: `latex_print` [INFO] [stderr] --> src/blocksworld/world.rs:52:5 [INFO] [stderr] | [INFO] [stderr] 52 | pub fn latex_print(&self) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: function is never used: `solution_depth_difficulty` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:9:1 [INFO] [stderr] | [INFO] [stderr] 9 | pub fn solution_depth_difficulty(goal_world: World) -> Vec<(u8, World)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: struct is never constructed: `SolutionDepthSearcher` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:16:1 [INFO] [stderr] | [INFO] [stderr] 16 | pub struct SolutionDepthSearcher { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `new` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:23:5 [INFO] [stderr] | [INFO] [stderr] 23 | pub fn new(start_world: World, max_difficulty: u8) -> SolutionDepthSearcher { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `search` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:31:5 [INFO] [stderr] | [INFO] [stderr] 31 | pub fn search(mut self) -> Vec<(u8, World)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `grid_size_difficulty` [INFO] [stderr] --> src/blocksworld/test/problem_generators/grid_size_difficulty.rs:1:1 [INFO] [stderr] | [INFO] [stderr] 1 | fn grid_size_difficulty() {} [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `test` [INFO] [stderr] --> src/blocksworld/test/mod.rs:16:1 [INFO] [stderr] | [INFO] [stderr] 16 | pub fn test() { [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `run_all_searchers_average` [INFO] [stderr] --> src/blocksworld/test/mod.rs:39:1 [INFO] [stderr] | [INFO] [stderr] 39 | fn run_all_searchers_average(start_world: &World, goal_world: &World, difficulty: u8) -> Vec { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/blocksworld/world.rs:78:51 [INFO] [stderr] | [INFO] [stderr] 78 | pub fn clone_and_move_agent(&self, direction: &Direction) -> Result { [INFO] [stderr] | ^^^^^^^^^^ help: consider passing by value instead: `Direction` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: You are using an explicit closure for cloning elements [INFO] [stderr] --> src/blocksworld/world.rs:108:12 [INFO] [stderr] | [INFO] [stderr] 108 | Ok(self.entities.get_by_second(location).map(|ent| ent.clone()).unwrap_or(Entity::None)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `self.entities.get_by_second(location).cloned()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_clone)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [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/blocksworld/world.rs:146:13 [INFO] [stderr] | [INFO] [stderr] 146 | / match *entity { [INFO] [stderr] 147 | | Entity::Agent => agent_count += 1, [INFO] [stderr] 148 | | _ => (), [INFO] [stderr] 149 | | } [INFO] [stderr] | |_____________^ help: try this: `if let Entity::Agent = *entity { agent_count += 1 }` [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] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/blocksworld/world.rs:196:9 [INFO] [stderr] | [INFO] [stderr] 196 | DIRECTIONS.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `DIRECTIONS` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:70:34 [INFO] [stderr] | [INFO] [stderr] 70 | let start_to_self_cost = match &parent { // Each node is only 1 move away from its parent. [INFO] [stderr] | __________________________________^ [INFO] [stderr] 71 | | &Some(ref parent_rc) => parent_rc.start_to_self_cost + 1, [INFO] [stderr] 72 | | &None => 0, [INFO] [stderr] 73 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 70 | let start_to_self_cost = match parent { // Each node is only 1 move away from its parent. [INFO] [stderr] 71 | Some(ref parent_rc) => parent_rc.start_to_self_cost + 1, [INFO] [stderr] 72 | None => 0, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/blocksworld/search/a_star_searcher.rs:110:9 [INFO] [stderr] | [INFO] [stderr] 110 | / match &self.parent { [INFO] [stderr] 111 | | &Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 112 | | &None => None, [INFO] [stderr] 113 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 110 | match self.parent { [INFO] [stderr] 111 | Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 112 | None => None, [INFO] [stderr] | [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/blocksworld/search/mod.rs:41:13 [INFO] [stderr] | [INFO] [stderr] 41 | / match max_depth { [INFO] [stderr] 42 | | Some(max_depth) => { [INFO] [stderr] 43 | | if child_depth > max_depth { [INFO] [stderr] 44 | | continue; [INFO] [stderr] ... | [INFO] [stderr] 47 | | None => (), [INFO] [stderr] 48 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [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] 41 | if let Some(max_depth) = max_depth { [INFO] [stderr] 42 | if child_depth > max_depth { [INFO] [stderr] 43 | continue; [INFO] [stderr] 44 | } [INFO] [stderr] 45 | } [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `while let` loop [INFO] [stderr] --> src/blocksworld/search/mod.rs:93:9 [INFO] [stderr] | [INFO] [stderr] 93 | / loop { [INFO] [stderr] 94 | | match parent { [INFO] [stderr] 95 | | Some(node_rc) => { [INFO] [stderr] 96 | | node_rc.get_world().pretty_print(); [INFO] [stderr] ... | [INFO] [stderr] 101 | | } [INFO] [stderr] 102 | | } [INFO] [stderr] | |_________^ help: try: `while let Some(node_rc) = parent { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/blocksworld/search/mod.rs:129:9 [INFO] [stderr] | [INFO] [stderr] 129 | / match &self.parent { [INFO] [stderr] 130 | | &Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 131 | | &None => None, [INFO] [stderr] 132 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: try [INFO] [stderr] | [INFO] [stderr] 129 | match self.parent { [INFO] [stderr] 130 | Some(ref parent_rc) => Some(parent_rc.clone()), [INFO] [stderr] 131 | None => None, [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: usage of `contains_key` followed by `insert` on a `BTreeMap` [INFO] [stderr] --> src/blocksworld/test/problem_generators/solution_depth_difficulty.rs:60:9 [INFO] [stderr] | [INFO] [stderr] 60 | / if !self.solutions.contains_key(&(result.0.get_depth() as u8)) { [INFO] [stderr] 61 | | self.solutions.insert(result.0.get_depth() as u8, node.get_world().clone()); [INFO] [stderr] 62 | | println!("New solution, depth {}", result.0.get_depth()); [INFO] [stderr] 63 | | } [INFO] [stderr] | |_________^ help: consider using: `self.solutions.entry(result.0.get_depth() as u8)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::map_entry)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stderr] [INFO] [stderr] warning: an inclusive range would be more readable [INFO] [stderr] --> src/blocksworld/test/mod.rs:45:16 [INFO] [stderr] | [INFO] [stderr] 45 | for run in 0..(try_runs + 1) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: use: `0..=try_runs` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::range_plus_one)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#range_plus_one [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 2.16s [INFO] running `"docker" "inspect" "a998b6e089fc2d69e2f95dc63f65599c4cb9f999e50a30f7a7cc1ee143e0ebd5"` [INFO] running `"docker" "rm" "-f" "a998b6e089fc2d69e2f95dc63f65599c4cb9f999e50a30f7a7cc1ee143e0ebd5"` [INFO] [stdout] a998b6e089fc2d69e2f95dc63f65599c4cb9f999e50a30f7a7cc1ee143e0ebd5