[INFO] updating cached repository rinon/icfp2017 [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/rinon/icfp2017 [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/rinon/icfp2017" "work/ex/clippy-test-run/sources/stable/gh/rinon/icfp2017"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/rinon/icfp2017'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/rinon/icfp2017" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rinon/icfp2017"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rinon/icfp2017'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 3455ef9fd322c79c97d4d9ac410b7342716d54cf [INFO] sha for GitHub repo rinon/icfp2017: 3455ef9fd322c79c97d4d9ac410b7342716d54cf [INFO] validating manifest of rinon/icfp2017 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 rinon/icfp2017 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 rinon/icfp2017 [INFO] finished frobbing rinon/icfp2017 [INFO] frobbed toml for rinon/icfp2017 written to work/ex/clippy-test-run/sources/stable/gh/rinon/icfp2017/Cargo.toml [INFO] started frobbing rinon/icfp2017 [INFO] finished frobbing rinon/icfp2017 [INFO] frobbed toml for rinon/icfp2017 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/rinon/icfp2017/Cargo.toml [INFO] crate rinon/icfp2017 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 rinon/icfp2017 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-2/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/rinon/icfp2017:/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] 2cdc8afc29531dde694a3def4d0342fe93e446cc5c9e9884728736139f2c7e95 [INFO] running `"docker" "start" "-a" "2cdc8afc29531dde694a3def4d0342fe93e446cc5c9e9884728736139f2c7e95"` [INFO] [stderr] Checking bincode v0.8.0 [INFO] [stderr] Checking serde_bytes v0.10.1 [INFO] [stderr] Checking punter v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/punter.rs:210:13 [INFO] [stderr] | [INFO] [stderr] 210 | input: input, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `input` [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/punter.rs:211:13 [INFO] [stderr] | [INFO] [stderr] 211 | site_index: site_index, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `site_index` [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/punter.rs:212:13 [INFO] [stderr] | [INFO] [stderr] 212 | edges: edges, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `edges` [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/punter.rs:213:13 [INFO] [stderr] | [INFO] [stderr] 213 | shortest_paths: shortest_paths, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `shortest_paths` [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/punter.rs:214:13 [INFO] [stderr] | [INFO] [stderr] 214 | ai: ai, [INFO] [stderr] | ^^^^^^ help: replace it with: `ai` [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/punter.rs:365:13 [INFO] [stderr] | [INFO] [stderr] 365 | punter: punter, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `punter` [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/punter.rs:399:13 [INFO] [stderr] | [INFO] [stderr] 399 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/punter.rs:539:13 [INFO] [stderr] | [INFO] [stderr] 539 | play: play, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `play` [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/punter.rs:676:13 [INFO] [stderr] | [INFO] [stderr] 676 | punter: punter, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `punter` [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/punter.rs:678:13 [INFO] [stderr] | [INFO] [stderr] 678 | c: c, [INFO] [stderr] | ^^^^ help: replace it with: `c` [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/punter.rs:210:13 [INFO] [stderr] | [INFO] [stderr] 210 | input: input, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `input` [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/punter.rs:211:13 [INFO] [stderr] | [INFO] [stderr] 211 | site_index: site_index, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `site_index` [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/punter.rs:212:13 [INFO] [stderr] | [INFO] [stderr] 212 | edges: edges, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `edges` [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/punter.rs:213:13 [INFO] [stderr] | [INFO] [stderr] 213 | shortest_paths: shortest_paths, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `shortest_paths` [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/punter.rs:214:13 [INFO] [stderr] | [INFO] [stderr] 214 | ai: ai, [INFO] [stderr] | ^^^^^^ help: replace it with: `ai` [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/punter.rs:365:13 [INFO] [stderr] | [INFO] [stderr] 365 | punter: punter, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `punter` [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/punter.rs:399:13 [INFO] [stderr] | [INFO] [stderr] 399 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/punter.rs:539:13 [INFO] [stderr] | [INFO] [stderr] 539 | play: play, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `play` [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/punter.rs:676:13 [INFO] [stderr] | [INFO] [stderr] 676 | punter: punter, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `punter` [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/punter.rs:678:13 [INFO] [stderr] | [INFO] [stderr] 678 | c: c, [INFO] [stderr] | ^^^^ help: replace it with: `c` [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: variable `iterations` is assigned to, but never used [INFO] [stderr] --> src/punter.rs:315:17 [INFO] [stderr] | [INFO] [stderr] 315 | let mut iterations = 0; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] = note: consider using `_iterations` instead [INFO] [stderr] [INFO] [stderr] warning: variable `iterations` is assigned to, but never used [INFO] [stderr] --> src/punter.rs:315:17 [INFO] [stderr] | [INFO] [stderr] 315 | let mut iterations = 0; [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] = note: consider using `_iterations` instead [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/punter.rs:128:45 [INFO] [stderr] | [INFO] [stderr] 128 | fn compute_shortest_paths(&self, edges: &EdgeMatrix, [INFO] [stderr] | ^^^^^^^^^^^ [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/punter.rs:223:43 [INFO] [stderr] | [INFO] [stderr] 223 | pub fn process_turn(&mut self, moves: &Vec) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[protocol::Move]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/punter.rs:225:13 [INFO] [stderr] | [INFO] [stderr] 225 | / match m { [INFO] [stderr] 226 | | &protocol::Move::claim ( [INFO] [stderr] 227 | | protocol::Claim {punter, source, target} [INFO] [stderr] 228 | | ) => { [INFO] [stderr] ... | [INFO] [stderr] 245 | | &protocol::Move::pass (_) => { } [INFO] [stderr] 246 | | } [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: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 225 | match *m { [INFO] [stderr] 226 | protocol::Move::claim ( [INFO] [stderr] 227 | protocol::Claim {punter, source, target} [INFO] [stderr] 228 | ) => { [INFO] [stderr] 229 | self.add_move(punter, source, target); [INFO] [stderr] 230 | } [INFO] [stderr] ... [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/punter.rs:263:42 [INFO] [stderr] | [INFO] [stderr] 263 | pub fn compute_scores(&self, rivers: &Vec, scores: &mut Vec) { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[River]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: the loop variable `punter` is only used to index `scores`. [INFO] [stderr] --> src/punter.rs:267:23 [INFO] [stderr] | [INFO] [stderr] 267 | for punter in 0..self.input.punters { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 267 | for in scores.iter_mut().take(self.input.punters) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u64 may become silently lossy if types change [INFO] [stderr] --> src/punter.rs:317:47 [INFO] [stderr] | [INFO] [stderr] 317 | let duration = Duration::from_millis((timeout as u64 * 1000) - 100); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `u64::from(timeout)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [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/punter.rs:128:45 [INFO] [stderr] | [INFO] [stderr] 128 | fn compute_shortest_paths(&self, edges: &EdgeMatrix, [INFO] [stderr] | ^^^^^^^^^^^ [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: length comparison to zero [INFO] [stderr] --> src/punter.rs:550:12 [INFO] [stderr] | [INFO] [stderr] 550 | if self.children.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.children.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/punter.rs:591:12 [INFO] [stderr] | [INFO] [stderr] 591 | if moves.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.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/punter.rs:607:17 [INFO] [stderr] | [INFO] [stderr] 607 | assert!(available_moves.len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!available_moves.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 are using an explicit closure for cloning elements [INFO] [stderr] --> src/punter.rs:612:59 [INFO] [stderr] | [INFO] [stderr] 612 | let new_node = Rc::new(RefCell::new(MCTSNode::new(new_child_move.map(|x| *x)))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `new_child_move.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: length comparison to zero [INFO] [stderr] --> src/punter.rs:624:20 [INFO] [stderr] | [INFO] [stderr] 624 | if choices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `choices.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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/punter.rs:683:64 [INFO] [stderr] | [INFO] [stderr] 683 | let leaf = self.root.borrow_mut().select(game, self.c).unwrap_or(self.root.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| self.root.clone())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/punter.rs:223:43 [INFO] [stderr] | [INFO] [stderr] 223 | pub fn process_turn(&mut self, moves: &Vec) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[protocol::Move]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/punter.rs:225:13 [INFO] [stderr] | [INFO] [stderr] 225 | / match m { [INFO] [stderr] 226 | | &protocol::Move::claim ( [INFO] [stderr] 227 | | protocol::Claim {punter, source, target} [INFO] [stderr] 228 | | ) => { [INFO] [stderr] ... | [INFO] [stderr] 245 | | &protocol::Move::pass (_) => { } [INFO] [stderr] 246 | | } [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: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 225 | match *m { [INFO] [stderr] 226 | protocol::Move::claim ( [INFO] [stderr] 227 | protocol::Claim {punter, source, target} [INFO] [stderr] 228 | ) => { [INFO] [stderr] 229 | self.add_move(punter, source, target); [INFO] [stderr] 230 | } [INFO] [stderr] ... [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/punter.rs:263:42 [INFO] [stderr] | [INFO] [stderr] 263 | pub fn compute_scores(&self, rivers: &Vec, scores: &mut Vec) { [INFO] [stderr] | ^^^^^^^^^^^ help: change this to: `&[River]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: the loop variable `punter` is only used to index `scores`. [INFO] [stderr] --> src/punter.rs:267:23 [INFO] [stderr] | [INFO] [stderr] 267 | for punter in 0..self.input.punters { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_range_loop)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stderr] help: consider using an iterator [INFO] [stderr] | [INFO] [stderr] 267 | for in scores.iter_mut().take(self.input.punters) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: casting u8 to u64 may become silently lossy if types change [INFO] [stderr] --> src/punter.rs:317:47 [INFO] [stderr] | [INFO] [stderr] 317 | let duration = Duration::from_millis((timeout as u64 * 1000) - 100); [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try: `u64::from(timeout)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/punter.rs:550:12 [INFO] [stderr] | [INFO] [stderr] 550 | if self.children.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.children.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/punter.rs:591:12 [INFO] [stderr] | [INFO] [stderr] 591 | if moves.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `moves.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/punter.rs:607:17 [INFO] [stderr] | [INFO] [stderr] 607 | assert!(available_moves.len() > 0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!available_moves.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 are using an explicit closure for cloning elements [INFO] [stderr] --> src/punter.rs:612:59 [INFO] [stderr] | [INFO] [stderr] 612 | let new_node = Rc::new(RefCell::new(MCTSNode::new(new_child_move.map(|x| *x)))); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: Consider calling the dedicated `cloned` method: `new_child_move.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: length comparison to zero [INFO] [stderr] --> src/punter.rs:624:20 [INFO] [stderr] | [INFO] [stderr] 624 | if choices.len() == 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `choices.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: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/punter.rs:683:64 [INFO] [stderr] | [INFO] [stderr] 683 | let leaf = self.root.borrow_mut().select(game, self.c).unwrap_or(self.root.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| self.root.clone())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: large size difference between variants [INFO] [stderr] --> src/protocol.rs:70:5 [INFO] [stderr] | [INFO] [stderr] 70 | Stop (OfflineStop), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::large_enum_variant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stderr] help: consider boxing the large fields to reduce the total size of the enum [INFO] [stderr] | [INFO] [stderr] 70 | Stop (Box), [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: large size difference between variants [INFO] [stderr] --> src/protocol.rs:70:5 [INFO] [stderr] | [INFO] [stderr] 70 | Stop (OfflineStop), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::large_enum_variant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stderr] help: consider boxing the large fields to reduce the total size of the enum [INFO] [stderr] | [INFO] [stderr] 70 | Stop (Box), [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/bin/punter.rs:83:29 [INFO] [stderr] | [INFO] [stderr] 83 | claim: claim, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `claim` [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/bin/punter.rs:84:29 [INFO] [stderr] | [INFO] [stderr] 84 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:88:29 [INFO] [stderr] | [INFO] [stderr] 88 | pass: pass, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `pass` [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/bin/punter.rs:89:29 [INFO] [stderr] | [INFO] [stderr] 89 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:93:29 [INFO] [stderr] | [INFO] [stderr] 93 | splurge: splurge, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `splurge` [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/bin/punter.rs:94:29 [INFO] [stderr] | [INFO] [stderr] 94 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:98:29 [INFO] [stderr] | [INFO] [stderr] 98 | option: option, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `option` [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/bin/punter.rs:99:29 [INFO] [stderr] | [INFO] [stderr] 99 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:83:29 [INFO] [stderr] | [INFO] [stderr] 83 | claim: claim, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `claim` [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/bin/punter.rs:84:29 [INFO] [stderr] | [INFO] [stderr] 84 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:88:29 [INFO] [stderr] | [INFO] [stderr] 88 | pass: pass, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `pass` [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/bin/punter.rs:89:29 [INFO] [stderr] | [INFO] [stderr] 89 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:93:29 [INFO] [stderr] | [INFO] [stderr] 93 | splurge: splurge, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `splurge` [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/bin/punter.rs:94:29 [INFO] [stderr] | [INFO] [stderr] 94 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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/bin/punter.rs:98:29 [INFO] [stderr] | [INFO] [stderr] 98 | option: option, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `option` [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/bin/punter.rs:99:29 [INFO] [stderr] | [INFO] [stderr] 99 | state: state, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `state` [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: All the struct fields are matched to a wildcard pattern, consider using `..`. [INFO] [stderr] --> src/bin/punter.rs:109:13 [INFO] [stderr] | [INFO] [stderr] 109 | protocol::OfflineInput::Timeout {timeout: _} => { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `Timeout { .. }` instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/bin/online.rs:87:43 [INFO] [stderr] | [INFO] [stderr] 87 | protocol::TurnS::stop{scores, moves: _} => { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `stop { scores, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: unused variable: `handshake` [INFO] [stderr] --> src/bin/punter.rs:53:13 [INFO] [stderr] | [INFO] [stderr] 53 | let handshake: protocol::HandshakeS = self.recv_message(reader) [INFO] [stderr] | ^^^^^^^^^ help: consider using `_handshake` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `stop` [INFO] [stderr] --> src/bin/punter.rs:104:40 [INFO] [stderr] | [INFO] [stderr] 104 | protocol::OfflineStop {stop, state} [INFO] [stderr] | ^^^^ help: try ignoring the field: `stop: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `state` [INFO] [stderr] --> src/bin/punter.rs:104:46 [INFO] [stderr] | [INFO] [stderr] 104 | protocol::OfflineStop {stop, state} [INFO] [stderr] | ^^^^^ help: try ignoring the field: `state: _` [INFO] [stderr] [INFO] [stderr] warning: All the struct fields are matched to a wildcard pattern, consider using `..`. [INFO] [stderr] --> src/bin/punter.rs:109:13 [INFO] [stderr] | [INFO] [stderr] 109 | protocol::OfflineInput::Timeout {timeout: _} => { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `Timeout { .. }` instead [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/bin/punter.rs:42:35 [INFO] [stderr] | [INFO] [stderr] 42 | let _ = reader.read_until(':' as u8, &mut buf); [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b':' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: unused variable: `handshake` [INFO] [stderr] --> src/bin/punter.rs:53:13 [INFO] [stderr] | [INFO] [stderr] 53 | let handshake: protocol::HandshakeS = self.recv_message(reader) [INFO] [stderr] | ^^^^^^^^^ help: consider using `_handshake` instead [INFO] [stderr] | [INFO] [stderr] = note: #[warn(unused_variables)] on by default [INFO] [stderr] [INFO] [stderr] warning: unused variable: `stop` [INFO] [stderr] --> src/bin/punter.rs:104:40 [INFO] [stderr] | [INFO] [stderr] 104 | protocol::OfflineStop {stop, state} [INFO] [stderr] | ^^^^ help: try ignoring the field: `stop: _` [INFO] [stderr] [INFO] [stderr] warning: unused variable: `state` [INFO] [stderr] --> src/bin/punter.rs:104:46 [INFO] [stderr] | [INFO] [stderr] 104 | protocol::OfflineStop {stop, state} [INFO] [stderr] | ^^^^^ help: try ignoring the field: `state: _` [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/bin/dummy.rs:20:42 [INFO] [stderr] | [INFO] [stderr] 20 | if let protocol::TurnS::stop{scores, moves: _} = turn { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `stop { scores, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/bin/online.rs:43:31 [INFO] [stderr] | [INFO] [stderr] 43 | let _ = stream.read_until(':' as u8, &mut buf); [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b':' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/bin/punter.rs:42:35 [INFO] [stderr] | [INFO] [stderr] 42 | let _ = reader.read_until(':' as u8, &mut buf); [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b':' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:112:44 [INFO] [stderr] | [INFO] [stderr] 112 | let server = matches.opt_str("server").unwrap_or(DEFAULT_SERVER.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_SERVER.to_string())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:113:45 [INFO] [stderr] | [INFO] [stderr] 113 | let port: u16 = matches.opt_str("port").unwrap_or(DEFAULT_PORT.to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_PORT.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:115:40 [INFO] [stderr] | [INFO] [stderr] 115 | let name = matches.opt_str("name").unwrap_or(DEFAULT_NAME.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_NAME.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:116:50 [INFO] [stderr] | [INFO] [stderr] 116 | let timeout: u8 = matches.opt_str("timeout").unwrap_or(DEFAULT_TIMEOUT.to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_TIMEOUT.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/bin/online.rs:87:43 [INFO] [stderr] | [INFO] [stderr] 87 | protocol::TurnS::stop{scores, moves: _} => { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `stop { scores, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/bin/dummy.rs:20:42 [INFO] [stderr] | [INFO] [stderr] 20 | if let protocol::TurnS::stop{scores, moves: _} = turn { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `stop { scores, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: casting character literal to u8. `char`s are 4 bytes wide in rust, so casting to u8 truncates them [INFO] [stderr] --> src/bin/online.rs:43:31 [INFO] [stderr] | [INFO] [stderr] 43 | let _ = stream.read_until(':' as u8, &mut buf); [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::char_lit_as_u8)] on by default [INFO] [stderr] = help: Consider using a byte literal instead: [INFO] [stderr] b':' [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:112:44 [INFO] [stderr] | [INFO] [stderr] 112 | let server = matches.opt_str("server").unwrap_or(DEFAULT_SERVER.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_SERVER.to_string())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:113:45 [INFO] [stderr] | [INFO] [stderr] 113 | let port: u16 = matches.opt_str("port").unwrap_or(DEFAULT_PORT.to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_PORT.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:115:40 [INFO] [stderr] | [INFO] [stderr] 115 | let name = matches.opt_str("name").unwrap_or(DEFAULT_NAME.to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_NAME.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/bin/online.rs:116:50 [INFO] [stderr] | [INFO] [stderr] 116 | let timeout: u8 = matches.opt_str("timeout").unwrap_or(DEFAULT_TIMEOUT.to_string()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| DEFAULT_TIMEOUT.to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 6.11s [INFO] running `"docker" "inspect" "2cdc8afc29531dde694a3def4d0342fe93e446cc5c9e9884728736139f2c7e95"` [INFO] running `"docker" "rm" "-f" "2cdc8afc29531dde694a3def4d0342fe93e446cc5c9e9884728736139f2c7e95"` [INFO] [stdout] 2cdc8afc29531dde694a3def4d0342fe93e446cc5c9e9884728736139f2c7e95