[INFO] updating cached repository Kwarf/Allie-2017 [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/Kwarf/Allie-2017 [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/Kwarf/Allie-2017" "work/ex/clippy-test-run/sources/stable/gh/Kwarf/Allie-2017"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/Kwarf/Allie-2017'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/Kwarf/Allie-2017" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Kwarf/Allie-2017"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Kwarf/Allie-2017'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] bd2a1bc2b49e2c6bb8a7d7b20602219ef7f2b724 [INFO] sha for GitHub repo Kwarf/Allie-2017: bd2a1bc2b49e2c6bb8a7d7b20602219ef7f2b724 [INFO] validating manifest of Kwarf/Allie-2017 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 Kwarf/Allie-2017 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 Kwarf/Allie-2017 [INFO] finished frobbing Kwarf/Allie-2017 [INFO] frobbed toml for Kwarf/Allie-2017 written to work/ex/clippy-test-run/sources/stable/gh/Kwarf/Allie-2017/Cargo.toml [INFO] started frobbing Kwarf/Allie-2017 [INFO] finished frobbing Kwarf/Allie-2017 [INFO] frobbed toml for Kwarf/Allie-2017 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/Kwarf/Allie-2017/Cargo.toml [INFO] crate Kwarf/Allie-2017 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 Kwarf/Allie-2017 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/Kwarf/Allie-2017:/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] 7fd8fe1b0fd6ec2aa82d4eb985715cc1c79822ed325c0a171b521106a394ba2a [INFO] running `"docker" "start" "-a" "7fd8fe1b0fd6ec2aa82d4eb985715cc1c79822ed325c0a171b521106a394ba2a"` [INFO] [stderr] Checking itertools v0.5.9 [INFO] [stderr] Checking pathfinding v0.1.10 [INFO] [stderr] Checking allie v1.2.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/common/mod.rs:55:13 [INFO] [stderr] | [INFO] [stderr] 55 | x: x, [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/common/mod.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | 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/game/mod.rs:95:13 [INFO] [stderr] | [INFO] [stderr] 95 | 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/common/mod.rs:55:13 [INFO] [stderr] | [INFO] [stderr] 55 | x: x, [INFO] [stderr] | ^^^^ help: replace it with: `x` [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/common/mod.rs:56:13 [INFO] [stderr] | [INFO] [stderr] 56 | 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/game/mod.rs:95:13 [INFO] [stderr] | [INFO] [stderr] 95 | 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: unused import: `Instant` [INFO] [stderr] --> src/main.rs:15:27 [INFO] [stderr] | [INFO] [stderr] 15 | use std::time::{Duration, Instant}; [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/main.rs:27:16 [INFO] [stderr] | [INFO] [stderr] 27 | const ARG_IP: &'static str = "ip"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/main.rs:28:18 [INFO] [stderr] | [INFO] [stderr] 28 | const ARG_PORT: &'static str = "port"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: unused import: `Instant` [INFO] [stderr] --> src/main.rs:15:27 [INFO] [stderr] | [INFO] [stderr] 15 | use std::time::{Duration, Instant}; [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_imports)] on by default [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/ai/pathfinder.rs:135:25 [INFO] [stderr] | [INFO] [stderr] 135 | const DEFAULT_MAP: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|o||||.|||||.||.|||||.||||o|","|.||||.|||||.||.|||||.||||.|","|....|................|....|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|....|.||....||....||.|....|","||||||.|||||_||_|||||.||||||","_____|.|||||_||_|||||.|_____","_____|.||__________||.|_____","_____|.||_|||--|||_||.|_____","||||||.||_|______|_||.||||||","______.___|______|___.______","||||||.||_|______|_||.||||||","_____|.||_|||--|||_||.|_____","_____|.||__________||.|_____","_____|.||_||||||||_||.|_____","||||||.||_||||||||_||.||||||","|....|.......||.......|....|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|o..||.......__.......||..o|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|......||....||....||......|","|.||||||||||.||.||||||||||.|","|.||||||||||.||.||||||||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":238,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/ai/strategies/avoidance.rs:103:23 [INFO] [stderr] | [INFO] [stderr] 103 | const STATE: &'static str = r#"{"gamestate":{"map":{"content":["||||||||||||||||||||||||||||","|____________||____________|","|_||||_|||||_||_|||||_||||_|","|_||||_|||||_||_|||||_||||_|","|.||||_|||||_||_|||||_||||.|","|....|________________|....|","|.||||_||_||||||||_||_||||.|","|.||||_||_||||||||_||_||||.|","|....|_||____||____||_|....|","||||||_|||||_||_|||||_||||||","_____|_|||||_||_|||||_|_____","_____|_||__________||_|_____","_____|_||_|||--|||_||_|_____","||||||_||_|______|_||_||||||","__________|______|__________","||||||_||_|______|_||_||||||","_____|_||_|||--|||_||_|_____","_____|_||__________||_|_____","_____|_||_||||||||_||_|_____","||||||_||_||||||||_||_||||||","|....|_______||_______|....|","|.||||_|||||_||_|||||_||||.|","|.||||_|||||_||_|||||_||||.|","|o..||________________||..o|","|||.||_||_||||||||_||_||.|||","|||.||_||_||||||||_||_||.|||","|______||____||____||______|","|_||||||||||_||_||||||||||_|","|_||||||||||_||_||||||||||_|","|__________________________|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":42,"width":28},"others":[{"id":0,"isdangerous":true,"score":59,"x":17,"y":5},{"id":1,"isdangerous":true,"score":59,"x":12,"y":5}],"you":{"id":1,"isdangerous":false,"score":153,"x":15,"y":5}},"messagetype":"stateupdate"}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/common/mod.rs:153:25 [INFO] [stderr] | [INFO] [stderr] 153 | const DEFAULT_MAP: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|o||||.|||||.||.|||||.||||o|","|.||||.|||||.||.|||||.||||.|","|....|................|....|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|....|.||....||....||.|....|","||||||.|||||_||_|||||.||||||","_____|.|||||_||_|||||.|_____","_____|.||__________||.|_____","_____|.||_|||--|||_||.|_____","||||||.||_|______|_||.||||||","______.___|______|___.______","||||||.||_|______|_||.||||||","_____|.||_|||--|||_||.|_____","_____|.||__________||.|_____","_____|.||_||||||||_||.|_____","||||||.||_||||||||_||.||||||","|....|.......||.......|....|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|o..||.......__.......||..o|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|......||....||....||......|","|.||||||||||.||.||||||||||.|","|.||||||||||.||.||||||||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":238,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:256:21 [INFO] [stderr] | [INFO] [stderr] 256 | const DEFAULT: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|o||||.|||||.||.|||||.||||o|","|.||||.|||||.||.|||||.||||.|","|....|................|....|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|....|.||....||....||.|....|","||||||.|||||_||_|||||.||||||","_____|.|||||_||_|||||.|_____","_____|.||__________||.|_____","_____|.||_|||--|||_||.|_____","||||||.||_|______|_||.||||||","______.___|______|___.______","||||||.||_|______|_||.||||||","_____|.||_|||--|||_||.|_____","_____|.||__________||.|_____","_____|.||_||||||||_||.|_____","||||||.||_||||||||_||.||||||","|....|.......||.......|....|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|o..||.......__.......||..o|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|......||....||....||......|","|.||||||||||.||.||||||||||.|","|.||||||||||.||.||||||||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":238,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:257:23 [INFO] [stderr] | [INFO] [stderr] 257 | const MSPACMAN1: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|......||..........||......|","|o||||.||.||||||||.||.||||o|","|.||||.||.||||||||.||.||||.|","|..........................|","|||.||.|||||.||.|||||.||.|||","__|.||.|||||.||.|||||.||.|__","|||.||.|||||.||.|||||.||.|||","___.||.......||.......||.___","|||.|||||_||||||||_|||||.|||","__|.|||||_||||||||_|||||.|__","__|.____________________.|__","__|.|||||_|||--|||_|||||.|__","__|.|||||_|______|_|||||.|__","__|.||____|______|____||.|__","__|.||_||_|______|_||_||.|__","|||.||_||_|||--|||_||_||.|||","___.___||__________||___.___","|||.||||||||_||_||||||||.|||","__|.||||||||_||_||||||||.|__","__|.......___||___.......|__","__|.|||||.||||||||.|||||.|__","|||.|||||.||||||||.|||||.|||","|............__............|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|.||||.||....||....||.||||.|","|o||||.||.||||||||.||.||||o|","|.||||.||.||||||||.||.||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":220,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:258:23 [INFO] [stderr] | [INFO] [stderr] 258 | const MSPACMAN2: &'static str = r#"{"content":["||||||||||||||||||||||||||||","_______||..........||_______","||||||_||.||||||||.||_||||||","||||||_||.||||||||.||_||||||","|o...........||...........o|","|.|||||||.||.||.||.|||||||.|","|.|||||||.||.||.||.|||||||.|","|.||......||.||.||......||.|","|.||.||||_||....||_||||.||.|","|.||.||||_||||||||_||||.||.|","|......||_||||||||_||......|","||||||.||__________||.||||||","||||||.||_|||--|||_||.||||||","|......||_|______|_||......|","|.||||.||_|______|_||.||||.|","|.||||.___|______|___.||||.|","|...||.||_|||--|||_||.||...|","|||.||.||__________||.||.|||","__|.||.||||_||||_||||.||.|__","__|.||.||||_||||_||||.||.|__","__|.........||||.........|__","__|.|||||||.||||.|||||||.|__","|||.|||||||.||||.|||||||.|||","___....||...____...||....___","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|o..||.......||.......||..o|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":240,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:259:23 [INFO] [stderr] | [INFO] [stderr] 259 | const MSPACMAN3: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|.........||....||.........|","|.|||||||.||.||.||.|||||||.|","|o|||||||.||.||.||.|||||||o|","|.||.........||.........||.|","|.||.||.||||.||.||||.||.||.|","|....||.||||.||.||||.||....|","||||.||.||||.||.||||.||.||||","||||.||..............||.||||","_....||||_||||||||_||||...._","|.||_||||_||||||||_||||_||.|","|.||____________________||.|","|.||||_||_|||--|||_||_||||.|","|.||||_||_|______|_||_||||.|","|._____||_|______|_||_____.|","|.||_||||_|______|_||||_||.|","|.||_||||_|||--|||_||||_||.|","|.||____________________||.|","|.||||_|||||_||_|||||_||||.|","|.||||_|||||_||_|||||_||||.|","|......||....||....||......|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|o..||.......__.......||..o|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|......||....||....||......|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|......||..........||......|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":238,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:260:23 [INFO] [stderr] | [INFO] [stderr] 260 | const MSPACMAN4: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|..........................|","|.||.||||.||||||||.||||.||.|","|o||.||||.||||||||.||||.||o|","|.||.||||.||....||.||||.||.|","|.||......||.||.||......||.|","|.||||.||.||.||.||.||.||||.|","|.||||.||.||.||.||.||.||||.|","|......||....||....||......|","|||.||||||||_||_||||||||.|||","__|.||||||||_||_||||||||.|__","__|....||__________||....|__","|||_||.||_|||--|||_||.||_|||","____||.||_|______|_||.||____","||||||.___|______|___.||||||","||||||.||_|______|_||.||||||","____||.||_|||--|||_||.||____","|||_||.||__________||.||_|||","__|....|||||_||_|||||....|__","__|.||.|||||_||_|||||.||.|__","__|.||....___||___....||.|__","__|.|||||.||_||_||.|||||.|__","|||.|||||.||_||_||.|||||.|||","|.........||____||.........|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|.||...||..........||...||.|","|o||.|||||||.||.|||||||.||o|","|.||.|||||||.||.|||||||.||.|","|............||............|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":234,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:261:20 [INFO] [stderr] | [INFO] [stderr] 261 | const PACMAN: &'static str = r#"{"content":["||||||||||||||||||||||||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|o||||.|||||.||.|||||.||||o|","|.||||.|||||.||.|||||.||||.|","|..........................|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|......||....||....||......|","||||||.|||||_||_|||||.||||||","_____|.|||||_||_|||||.|_____","_____|.||__________||.|_____","_____|.||_|||--|||_||.|_____","||||||.||_|______|_||.||||||","______.___|______|___.______","||||||.||_|______|_||.||||||","_____|.||_|||--|||_||.|_____","_____|.||__________||.|_____","_____|.||_||||||||_||.|_____","||||||.||_||||||||_||.||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|o..||.......__.......||..o|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|......||....||....||......|","|.||||||||||.||.||||||||||.|","|.||||||||||.||.||||||||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":240,"width":28}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:282:37 [INFO] [stderr] | [INFO] [stderr] 282 | const SIMPLE_INTERSECTION: &'static str = r#" [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:307:40 [INFO] [stderr] | [INFO] [stderr] 307 | const THREE_WAY_INTERSECTION: &'static str = r#" [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:331:22 [INFO] [stderr] | [INFO] [stderr] 331 | const TURN: &'static str = r#" [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:353:26 [INFO] [stderr] | [INFO] [stderr] 353 | const STRAIGHT: &'static str = r#" [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:376:25 [INFO] [stderr] | [INFO] [stderr] 376 | const TESTMAP: &'static str = r#" [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/game/mod.rs:400:40 [INFO] [stderr] | [INFO] [stderr] 400 | const THREE_WAY_INTERSECTION: &'static str = r#" [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/protocol/json.rs:79:29 [INFO] [stderr] | [INFO] [stderr] 79 | const EXAMPLE_WELCOME: &'static str = r#"{"map":{"content":["||||||||||||||||||||||||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|o||||.|||||.||.|||||.||||o|","|.||||.|||||.||.|||||.||||.|","|..........................|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|......||....||....||......|","||||||.|||||_||_|||||.||||||","_____|.|||||_||_|||||.|_____","_____|.||__________||.|_____","_____|.||_|||__|||_||.|_____","||||||.||_|______|_||.||||||","______.___|______|___.______","||||||.||_|______|_||.||||||","_____|.||_|||__|||_||.|_____","_____|.||__________||.|_____","_____|.||_||||||||_||.|_____","||||||.||_||||||||_||.||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|o..||.......__.......||..o|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|......||....||....||......|","|.||||||||||.||.||||||||||.|","|.||||||||||.||.||||||||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":240,"width":28},"messagetype":"welcome","you":{"id":0,"x":11,"y":13}}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/protocol/json.rs:80:33 [INFO] [stderr] | [INFO] [stderr] 80 | const EXAMPLE_STATEUPDATE: &'static str = r#"{"gamestate":{"map":{"content":["||||||||||||||||||||||||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|o||||.|||||.||.|||||.||||o|","|.||||.|||||.||.|||||.||||.|","|..........................|","|.||||.||.||||||||.||.||||.|","|.||||.||.||||||||.||.||||.|","|......||....||....||......|","||||||.|||||_||_|||||.||||||","_____|.|||||_||_|||||.|_____","_____|.||__________||.|_____","_____|.||_|||__|||_||.|_____","||||||.||_|______|_||.||||||","______.___|______|___.______","||||||.||_|______|_||.||||||","_____|.||_|||__|||_||.|_____","_____|.||__________||.|_____","_____|.||_||||||||_||.|_____","||||||.||_||||||||_||.||||||","|............||............|","|.||||.|||||.||.|||||.||||.|","|.||||.|||||.||.|||||.||||.|","|o..||.......__.......||..o|","|||.||.||.||||||||.||.||.|||","|||.||.||.||||||||.||.||.|||","|......||....||....||......|","|.||||||||||.||.||||||||||.|","|.||||||||||.||.||||||||||.|","|..........................|","||||||||||||||||||||||||||||"],"height":31,"pelletsleft":240,"width":28},"others":[],"you":{"id":0,"x":11,"y":13,"score":130,"isdangerous":true}},"messagetype":"stateupdate"}"#; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/main.rs:27:16 [INFO] [stderr] | [INFO] [stderr] 27 | const ARG_IP: &'static str = "ip"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/main.rs:28:18 [INFO] [stderr] | [INFO] [stderr] 28 | const ARG_PORT: &'static str = "port"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: method is never used: `new` [INFO] [stderr] --> src/ai/strategies/killer.rs:13:5 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn new() -> Killer { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: method is never used: `is_enemy_nearby` [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:21:5 [INFO] [stderr] | [INFO] [stderr] 21 | fn is_enemy_nearby(&self, bot: &Bot, state: &GameState) -> bool { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `neighbours` [INFO] [stderr] --> src/game/mod.rs:56:5 [INFO] [stderr] | [INFO] [stderr] 56 | pub fn neighbours(&self, position: &Position) -> Vec<(Direction, TileType)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `pellets` [INFO] [stderr] --> src/game/mod.rs:71:5 [INFO] [stderr] | [INFO] [stderr] 71 | pub fn pellets(&self) -> HashSet { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `walkable_positions` [INFO] [stderr] --> src/game/mod.rs:207:5 [INFO] [stderr] | [INFO] [stderr] 207 | pub fn walkable_positions(&self) -> &HashSet { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `closest_turning_points` [INFO] [stderr] --> src/game/mod.rs:211:5 [INFO] [stderr] | [INFO] [stderr] 211 | pub fn closest_turning_points(&self, limits: &T, position: &Position) -> HashSet { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `dead_ends` [INFO] [stderr] --> src/game/mod.rs:232:5 [INFO] [stderr] | [INFO] [stderr] 232 | pub fn dead_ends(&self) -> &HashSet { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: function is never used: `duration_in_ms` [INFO] [stderr] --> src/main.rs:111:1 [INFO] [stderr] | [INFO] [stderr] 111 | fn duration_in_ms(duration: &Duration) -> f32 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/ai/strategies/avoidance.rs:54:25 [INFO] [stderr] | [INFO] [stderr] 54 | .filter(|e| !(bot.can_eat_others() && !e.is_dangerous)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e.is_dangerous || !bot.can_eat_others()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/avoidance.rs:62:16 [INFO] [stderr] | [INFO] [stderr] 62 | if enemy_directions.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `enemy_directions.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/avoidance.rs:85:16 [INFO] [stderr] | [INFO] [stderr] 85 | if possible_directions.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!possible_directions.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/killer.rs:39:37 [INFO] [stderr] | [INFO] [stderr] 39 | if !bot.can_eat_others() && remaining_super_pellets.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `remaining_super_pellets.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:22:9 [INFO] [stderr] | [INFO] [stderr] 22 | / state.enemies [INFO] [stderr] 23 | | .iter() [INFO] [stderr] 24 | | .filter(|e| !bot.map_information.is_dead_end(&e.position())) [INFO] [stderr] 25 | | .find(|e| bot.path_graph.cost_to(&e.position()).unwrap_or(usize::max_value()) <= 3) [INFO] [stderr] 26 | | .is_some() [INFO] [stderr] | |______________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = note: replace `find(|e| bot.path_graph.cost_to(&e.position()).unwrap_or(usize::max_value()) <= 3).is_some()` with `any(|e| bot.path_graph.cost_to(&e.position()).unwrap_or(usize::max_value()) <= 3)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the HashSet [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:54:14 [INFO] [stderr] | [INFO] [stderr] 54 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:58:28 [INFO] [stderr] | [INFO] [stderr] 58 | .filter(|path| path.len() > 0) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!path.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:77:9 [INFO] [stderr] | [INFO] [stderr] 77 | / if let &Some(ref pos) = &self.target_pellet { [INFO] [stderr] 78 | | return pathfinder::get_shortest_no_enemies(&state.map, &state.me.position(), &pos, &state.enemies) [INFO] [stderr] 79 | | .and_then(|path| Some(path.last().unwrap().clone())) [INFO] [stderr] 80 | | .and_then(|pos| state.me.position().direction_to(&state.map, &pos)); [INFO] [stderr] 81 | | } [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] 77 | if let Some(ref pos) = self.target_pellet { [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/game/mod.rs:18:24 [INFO] [stderr] | [INFO] [stderr] 18 | pub fn is_walkable(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/game/mod.rs:25:22 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn is_pellet(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/game/mod.rs:32:28 [INFO] [stderr] | [INFO] [stderr] 32 | pub fn is_super_pellet(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/game/mod.rs:65:40 [INFO] [stderr] | [INFO] [stderr] 65 | pub fn points_in_path(&self, path: &Vec) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: change this to: `&[Position]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/protocol/json.rs:54:69 [INFO] [stderr] | [INFO] [stderr] 54 | Ok(x) => Ok(protocol::Message::Welcome { state: x.into() }), [INFO] [stderr] | ^^^^^^^^ help: consider removing `.into()`: `x` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/protocol/json.rs:61:68 [INFO] [stderr] | [INFO] [stderr] 61 | Ok(x) => Ok(protocol::Message::Update { state: x.gamestate.into() }), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `x.gamestate` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: method is never used: `new` [INFO] [stderr] --> src/ai/strategies/killer.rs:13:5 [INFO] [stderr] | [INFO] [stderr] 13 | pub fn new() -> Killer { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: method is never used: `is_enemy_nearby` [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:21:5 [INFO] [stderr] | [INFO] [stderr] 21 | fn is_enemy_nearby(&self, bot: &Bot, state: &GameState) -> bool { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `neighbours` [INFO] [stderr] --> src/game/mod.rs:56:5 [INFO] [stderr] | [INFO] [stderr] 56 | pub fn neighbours(&self, position: &Position) -> Vec<(Direction, TileType)> { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `walkable_positions` [INFO] [stderr] --> src/game/mod.rs:207:5 [INFO] [stderr] | [INFO] [stderr] 207 | pub fn walkable_positions(&self) -> &HashSet { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: method is never used: `closest_turning_points` [INFO] [stderr] --> src/game/mod.rs:211:5 [INFO] [stderr] | [INFO] [stderr] 211 | pub fn closest_turning_points(&self, limits: &T, position: &Position) -> HashSet { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/ai/strategies/avoidance.rs:54:25 [INFO] [stderr] | [INFO] [stderr] 54 | .filter(|e| !(bot.can_eat_others() && !e.is_dangerous)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `e.is_dangerous || !bot.can_eat_others()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/avoidance.rs:62:16 [INFO] [stderr] | [INFO] [stderr] 62 | if enemy_directions.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `enemy_directions.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/avoidance.rs:85:16 [INFO] [stderr] | [INFO] [stderr] 85 | if possible_directions.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!possible_directions.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/killer.rs:39:37 [INFO] [stderr] | [INFO] [stderr] 39 | if !bot.can_eat_others() && remaining_super_pellets.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `remaining_super_pellets.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: called `is_some()` after searching an `Iterator` with find. This is more succinctly expressed by calling `any()`. [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:22:9 [INFO] [stderr] | [INFO] [stderr] 22 | / state.enemies [INFO] [stderr] 23 | | .iter() [INFO] [stderr] 24 | | .filter(|e| !bot.map_information.is_dead_end(&e.position())) [INFO] [stderr] 25 | | .find(|e| bot.path_graph.cost_to(&e.position()).unwrap_or(usize::max_value()) <= 3) [INFO] [stderr] 26 | | .is_some() [INFO] [stderr] | |______________________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::search_is_some)] on by default [INFO] [stderr] = note: replace `find(|e| bot.path_graph.cost_to(&e.position()).unwrap_or(usize::max_value()) <= 3).is_some()` with `any(|e| bot.path_graph.cost_to(&e.position()).unwrap_or(usize::max_value()) <= 3)` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#search_is_some [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the HashSet [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:54:14 [INFO] [stderr] | [INFO] [stderr] 54 | .into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:58:28 [INFO] [stderr] | [INFO] [stderr] 58 | .filter(|path| path.len() > 0) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!path.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to both the expression and the patterns [INFO] [stderr] --> src/ai/strategies/pick_pellets.rs:77:9 [INFO] [stderr] | [INFO] [stderr] 77 | / if let &Some(ref pos) = &self.target_pellet { [INFO] [stderr] 78 | | return pathfinder::get_shortest_no_enemies(&state.map, &state.me.position(), &pos, &state.enemies) [INFO] [stderr] 79 | | .and_then(|path| Some(path.last().unwrap().clone())) [INFO] [stderr] 80 | | .and_then(|pos| state.me.position().direction_to(&state.map, &pos)); [INFO] [stderr] 81 | | } [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] 77 | if let Some(ref pos) = self.target_pellet { [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/game/mod.rs:18:24 [INFO] [stderr] | [INFO] [stderr] 18 | pub fn is_walkable(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/game/mod.rs:25:22 [INFO] [stderr] | [INFO] [stderr] 25 | pub fn is_pellet(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/game/mod.rs:32:28 [INFO] [stderr] | [INFO] [stderr] 32 | pub fn is_super_pellet(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/game/mod.rs:65:40 [INFO] [stderr] | [INFO] [stderr] 65 | pub fn points_in_path(&self, path: &Vec) -> usize { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: change this to: `&[Position]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/protocol/json.rs:54:69 [INFO] [stderr] | [INFO] [stderr] 54 | Ok(x) => Ok(protocol::Message::Welcome { state: x.into() }), [INFO] [stderr] | ^^^^^^^^ help: consider removing `.into()`: `x` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::identity_conversion)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] warning: identical conversion [INFO] [stderr] --> src/protocol/json.rs:61:68 [INFO] [stderr] | [INFO] [stderr] 61 | Ok(x) => Ok(protocol::Message::Update { state: x.gamestate.into() }), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `x.gamestate` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_conversion [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/main.rs:121:9 [INFO] [stderr] | [INFO] [stderr] 121 | assert_eq!(2050.0, duration_in_ms(&Duration::new(2, 50_000_000))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/main.rs:121:9 [INFO] [stderr] | [INFO] [stderr] 121 | assert_eq!(2050.0, duration_in_ms(&Duration::new(2, 50_000_000))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `allie`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "7fd8fe1b0fd6ec2aa82d4eb985715cc1c79822ed325c0a171b521106a394ba2a"` [INFO] running `"docker" "rm" "-f" "7fd8fe1b0fd6ec2aa82d4eb985715cc1c79822ed325c0a171b521106a394ba2a"` [INFO] [stdout] 7fd8fe1b0fd6ec2aa82d4eb985715cc1c79822ed325c0a171b521106a394ba2a