[INFO] crate timely_communication 0.8.0 is already in cache [INFO] extracting crate timely_communication 0.8.0 into work/ex/clippy-test-run/sources/stable/reg/timely_communication/0.8.0 [INFO] extracting crate timely_communication 0.8.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/timely_communication/0.8.0 [INFO] validating manifest of timely_communication-0.8.0 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 timely_communication-0.8.0 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 timely_communication-0.8.0 [INFO] finished frobbing timely_communication-0.8.0 [INFO] frobbed toml for timely_communication-0.8.0 written to work/ex/clippy-test-run/sources/stable/reg/timely_communication/0.8.0/Cargo.toml [INFO] started frobbing timely_communication-0.8.0 [INFO] finished frobbing timely_communication-0.8.0 [INFO] frobbed toml for timely_communication-0.8.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/timely_communication/0.8.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [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 timely_communication-0.8.0 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/reg/timely_communication/0.8.0:/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] 6dfae02d851beee8ef438b8f4df4cdd3754ff045dbef6af391efa5cbb32c2cde [INFO] running `"docker" "start" "-a" "6dfae02d851beee8ef438b8f4df4cdd3754ff045dbef6af391efa5cbb32c2cde"` [INFO] [stderr] Checking abomonation v0.7.0 [INFO] [stderr] Checking timely_bytes v0.7.0 [INFO] [stderr] Checking timely_logging v0.7.1 [INFO] [stderr] Compiling abomonation_derive v0.3.0 [INFO] [stderr] Checking timely_communication v0.8.0 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/allocator/process.rs:28:13 [INFO] [stderr] | [INFO] [stderr] 28 | index: index, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index` [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/allocator/zero_copy/push_pull.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | header: header, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `header` [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/allocator/zero_copy/push_pull.rs:31:13 [INFO] [stderr] | [INFO] [stderr] 31 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `sender` [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/allocator/process.rs:28:13 [INFO] [stderr] | [INFO] [stderr] 28 | index: index, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: replace it with: `index` [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/allocator/zero_copy/push_pull.rs:30:13 [INFO] [stderr] | [INFO] [stderr] 30 | header: header, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `header` [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/allocator/zero_copy/push_pull.rs:31:13 [INFO] [stderr] | [INFO] [stderr] 31 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `sender` [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: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/thread.rs:16:63 [INFO] [stderr] | [INFO] [stderr] 16 | fn allocate(&mut self, _identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/allocator/thread.rs:29:5 [INFO] [stderr] | [INFO] [stderr] 29 | / pub fn new() -> (Pusher, Puller) { [INFO] [stderr] 30 | | let shared = Rc::new(RefCell::new((VecDeque::::new(), VecDeque::::new()))); [INFO] [stderr] 31 | | (Pusher { target: shared.clone() }, Puller { source: shared, current: None }) [INFO] [stderr] 32 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_ret_no_self)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/allocator/process.rs:22:5 [INFO] [stderr] | [INFO] [stderr] 22 | pub fn inner<'a>(&'a mut self) -> &'a mut Thread { &mut self.inner } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/process.rs:38:76 [INFO] [stderr] | [INFO] [stderr] 38 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/allocator/process.rs:41:28 [INFO] [stderr] | [INFO] [stderr] 41 | let mut channels = self.channels.lock().ok().expect("mutex error?"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | / match self { [INFO] [stderr] 29 | | &Generic::Thread(ref t) => t.index(), [INFO] [stderr] 30 | | &Generic::Process(ref p) => p.index(), [INFO] [stderr] 31 | | &Generic::ProcessBinary(ref pb) => pb.index(), [INFO] [stderr] 32 | | &Generic::ZeroCopy(ref z) => z.index(), [INFO] [stderr] 33 | | } [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] 28 | match *self { [INFO] [stderr] 29 | Generic::Thread(ref t) => t.index(), [INFO] [stderr] 30 | Generic::Process(ref p) => p.index(), [INFO] [stderr] 31 | Generic::ProcessBinary(ref pb) => pb.index(), [INFO] [stderr] 32 | Generic::ZeroCopy(ref z) => z.index(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:37:9 [INFO] [stderr] | [INFO] [stderr] 37 | / match self { [INFO] [stderr] 38 | | &Generic::Thread(ref t) => t.peers(), [INFO] [stderr] 39 | | &Generic::Process(ref p) => p.peers(), [INFO] [stderr] 40 | | &Generic::ProcessBinary(ref pb) => pb.peers(), [INFO] [stderr] 41 | | &Generic::ZeroCopy(ref z) => z.peers(), [INFO] [stderr] 42 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 37 | match *self { [INFO] [stderr] 38 | Generic::Thread(ref t) => t.peers(), [INFO] [stderr] 39 | Generic::Process(ref p) => p.peers(), [INFO] [stderr] 40 | Generic::ProcessBinary(ref pb) => pb.peers(), [INFO] [stderr] 41 | Generic::ZeroCopy(ref z) => z.peers(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/generic.rs:45:59 [INFO] [stderr] | [INFO] [stderr] 45 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:46:9 [INFO] [stderr] | [INFO] [stderr] 46 | / match self { [INFO] [stderr] 47 | | &mut Generic::Thread(ref mut t) => t.allocate(identifier), [INFO] [stderr] 48 | | &mut Generic::Process(ref mut p) => p.allocate(identifier), [INFO] [stderr] 49 | | &mut Generic::ProcessBinary(ref mut pb) => pb.allocate(identifier), [INFO] [stderr] 50 | | &mut Generic::ZeroCopy(ref mut z) => z.allocate(identifier), [INFO] [stderr] 51 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 46 | match *self { [INFO] [stderr] 47 | Generic::Thread(ref mut t) => t.allocate(identifier), [INFO] [stderr] 48 | Generic::Process(ref mut p) => p.allocate(identifier), [INFO] [stderr] 49 | Generic::ProcessBinary(ref mut pb) => pb.allocate(identifier), [INFO] [stderr] 50 | Generic::ZeroCopy(ref mut z) => z.allocate(identifier), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:55:9 [INFO] [stderr] | [INFO] [stderr] 55 | / match self { [INFO] [stderr] 56 | | &mut Generic::Thread(ref mut t) => t.pre_work(), [INFO] [stderr] 57 | | &mut Generic::Process(ref mut p) => p.pre_work(), [INFO] [stderr] 58 | | &mut Generic::ProcessBinary(ref mut pb) => pb.pre_work(), [INFO] [stderr] 59 | | &mut Generic::ZeroCopy(ref mut z) => z.pre_work(), [INFO] [stderr] 60 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 55 | match *self { [INFO] [stderr] 56 | Generic::Thread(ref mut t) => t.pre_work(), [INFO] [stderr] 57 | Generic::Process(ref mut p) => p.pre_work(), [INFO] [stderr] 58 | Generic::ProcessBinary(ref mut pb) => pb.pre_work(), [INFO] [stderr] 59 | Generic::ZeroCopy(ref mut z) => z.pre_work(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:64:9 [INFO] [stderr] | [INFO] [stderr] 64 | / match self { [INFO] [stderr] 65 | | &mut Generic::Thread(ref mut t) => t.post_work(), [INFO] [stderr] 66 | | &mut Generic::Process(ref mut p) => p.post_work(), [INFO] [stderr] 67 | | &mut Generic::ProcessBinary(ref mut pb) => pb.post_work(), [INFO] [stderr] 68 | | &mut Generic::ZeroCopy(ref mut z) => z.post_work(), [INFO] [stderr] 69 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 64 | match *self { [INFO] [stderr] 65 | Generic::Thread(ref mut t) => t.post_work(), [INFO] [stderr] 66 | Generic::Process(ref mut p) => p.post_work(), [INFO] [stderr] 67 | Generic::ProcessBinary(ref mut pb) => pb.post_work(), [INFO] [stderr] 68 | Generic::ZeroCopy(ref mut z) => z.post_work(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/generic.rs:76:59 [INFO] [stderr] | [INFO] [stderr] 76 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `allocator::zero_copy::bytes_exchange::Signal` [INFO] [stderr] --> src/allocator/zero_copy/bytes_exchange.rs:37:5 [INFO] [stderr] | [INFO] [stderr] 37 | / pub fn new() -> Self { [INFO] [stderr] 38 | | Signal { thread: Arc::new(RwLock::new(None)) } [INFO] [stderr] 39 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 31 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:30:5 [INFO] [stderr] | [INFO] [stderr] 30 | logger.as_mut().map(|l| l.log(StateEvent { send: false, process, remote, start: true })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: false, process, remote, start: true }) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:75:13 [INFO] [stderr] | [INFO] [stderr] 75 | logger.as_mut().map(|logger| { [INFO] [stderr] | _____________^ [INFO] [stderr] | |_____________| [INFO] [stderr] | || [INFO] [stderr] 76 | || logger.log(MessageEvent { is_send: false, header, }); [INFO] [stderr] 77 | || }); [INFO] [stderr] | ||______________^- help: try this: `if let Some(logger) = logger.as_mut() { logger.log(MessageEvent { is_send: false, header, }); }` [INFO] [stderr] | |_______________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:104:5 [INFO] [stderr] | [INFO] [stderr] 104 | logger.as_mut().map(|l| l.log(StateEvent { send: false, process, remote, start: false, })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: false, process, remote, start: false, }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:122:5 [INFO] [stderr] | [INFO] [stderr] 122 | logger.as_mut().map(|l| l.log(StateEvent { send: true, process, remote, start: true, })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: true, process, remote, start: true, }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:153:17 [INFO] [stderr] | [INFO] [stderr] 153 | logger.as_mut().map(|logger| { [INFO] [stderr] | _________________^ [INFO] [stderr] | |_________________| [INFO] [stderr] | || [INFO] [stderr] 154 | || let mut offset = 0; [INFO] [stderr] 155 | || while let Some(header) = MessageHeader::try_read(&mut bytes[offset..]) { [INFO] [stderr] 156 | || logger.log(MessageEvent { is_send: true, header, }); [INFO] [stderr] 157 | || offset += header.required_bytes(); [INFO] [stderr] 158 | || } [INFO] [stderr] 159 | || }); [INFO] [stderr] | ||__________________^- help: try this: `if let Some(logger) = logger.as_mut() { ... }` [INFO] [stderr] | |___________________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:179:5 [INFO] [stderr] | [INFO] [stderr] 179 | logger.as_mut().map(|logger| logger.log(MessageEvent { is_send: true, header })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(logger) = logger.as_mut() { logger.log(MessageEvent { is_send: true, header }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:182:5 [INFO] [stderr] | [INFO] [stderr] 182 | logger.as_mut().map(|l| l.log(StateEvent { send: true, process, remote, start: false, })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: true, process, remote, start: false, }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/zero_copy/allocator.rs:38:4 [INFO] [stderr] | [INFO] [stderr] 38 | -> (Vec>, Vec<(Vec, Signal)>, Vec>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/zero_copy/allocator.rs:122:59 [INFO] [stderr] | [INFO] [stderr] 122 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: the loop variable `source` is only used to index `sends`. [INFO] [stderr] --> src/allocator/zero_copy/allocator_process.rs:45:23 [INFO] [stderr] | [INFO] [stderr] 45 | for source in 0 .. count { [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] 45 | for in sends.iter_mut().take(count) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/zero_copy/allocator_process.rs:117:59 [INFO] [stderr] | [INFO] [stderr] 117 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: the loop variable `index` is used to index `results` [INFO] [stderr] --> src/allocator/zero_copy/initialize.rs:58:18 [INFO] [stderr] | [INFO] [stderr] 58 | for index in 0..results.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [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] 58 | for (index, ) in results.iter_mut().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/mod.rs:37:59 [INFO] [stderr] | [INFO] [stderr] 37 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/networking.rs:35:26 [INFO] [stderr] | [INFO] [stderr] 35 | Some(header.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*header` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/networking.rs:111:26 [INFO] [stderr] | [INFO] [stderr] 111 | let identifier = unsafe { decode::(&mut buffer) }.expect("failed to decode worker index").0.clone() as usize; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*unsafe { decode::(&mut buffer) }.expect("failed to decode worker index").0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/initialize.rs:105:66 [INFO] [stderr] | [INFO] [stderr] 105 | Ok((Process::new_vector(threads).into_iter().map(|x| GenericBuilder::Process(x)).collect(), Box::new(()))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `GenericBuilder::Process` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/initialize.rs:109:47 [INFO] [stderr] | [INFO] [stderr] 109 | Ok((stuff.into_iter().map(|x| GenericBuilder::ZeroCopy(x)).collect(), Box::new(guard))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `GenericBuilder::ZeroCopy` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/message.rs:30:5 [INFO] [stderr] | [INFO] [stderr] 30 | / pub fn swap<'b>(self, element: &'b mut T) { [INFO] [stderr] 31 | | match self { [INFO] [stderr] 32 | | RefOrMut::Ref(reference) => element.clone_from(reference), [INFO] [stderr] 33 | | RefOrMut::Mut(reference) => ::std::mem::swap(reference, element), [INFO] [stderr] 34 | | }; [INFO] [stderr] 35 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: methods called `into_*` usually take self by value; consider choosing a less ambiguous name [INFO] [stderr] --> src/message.rs:124:44 [INFO] [stderr] | [INFO] [stderr] 124 | pub fn into_bytes(&self, writer: &mut W) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: defining a method called `as_mut` on this type; consider implementing the `std::convert::AsMut` trait or choosing a less ambiguous name [INFO] [stderr] --> src/message.rs:199:5 [INFO] [stderr] | [INFO] [stderr] 199 | / pub fn as_mut(&mut self) -> &mut T { [INFO] [stderr] 200 | | [INFO] [stderr] 201 | | let cloned: Option = match &self.payload { [INFO] [stderr] 202 | | MessageContents::Binary(bytes) => Some((*bytes).clone()), [INFO] [stderr] ... | [INFO] [stderr] 217 | | } [INFO] [stderr] 218 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/thread.rs:16:63 [INFO] [stderr] | [INFO] [stderr] 16 | fn allocate(&mut self, _identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/allocator/thread.rs:29:5 [INFO] [stderr] | [INFO] [stderr] 29 | / pub fn new() -> (Pusher, Puller) { [INFO] [stderr] 30 | | let shared = Rc::new(RefCell::new((VecDeque::::new(), VecDeque::::new()))); [INFO] [stderr] 31 | | (Pusher { target: shared.clone() }, Puller { source: shared, current: None }) [INFO] [stderr] 32 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_ret_no_self)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/allocator/process.rs:22:5 [INFO] [stderr] | [INFO] [stderr] 22 | pub fn inner<'a>(&'a mut self) -> &'a mut Thread { &mut self.inner } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/process.rs:38:76 [INFO] [stderr] | [INFO] [stderr] 38 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: called `ok().expect()` on a Result value. You can call `expect` directly on the `Result` [INFO] [stderr] --> src/allocator/process.rs:41:28 [INFO] [stderr] | [INFO] [stderr] 41 | let mut channels = self.channels.lock().ok().expect("mutex error?"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ok_expect)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ok_expect [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:28:9 [INFO] [stderr] | [INFO] [stderr] 28 | / match self { [INFO] [stderr] 29 | | &Generic::Thread(ref t) => t.index(), [INFO] [stderr] 30 | | &Generic::Process(ref p) => p.index(), [INFO] [stderr] 31 | | &Generic::ProcessBinary(ref pb) => pb.index(), [INFO] [stderr] 32 | | &Generic::ZeroCopy(ref z) => z.index(), [INFO] [stderr] 33 | | } [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] 28 | match *self { [INFO] [stderr] 29 | Generic::Thread(ref t) => t.index(), [INFO] [stderr] 30 | Generic::Process(ref p) => p.index(), [INFO] [stderr] 31 | Generic::ProcessBinary(ref pb) => pb.index(), [INFO] [stderr] 32 | Generic::ZeroCopy(ref z) => z.index(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:37:9 [INFO] [stderr] | [INFO] [stderr] 37 | / match self { [INFO] [stderr] 38 | | &Generic::Thread(ref t) => t.peers(), [INFO] [stderr] 39 | | &Generic::Process(ref p) => p.peers(), [INFO] [stderr] 40 | | &Generic::ProcessBinary(ref pb) => pb.peers(), [INFO] [stderr] 41 | | &Generic::ZeroCopy(ref z) => z.peers(), [INFO] [stderr] 42 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 37 | match *self { [INFO] [stderr] 38 | Generic::Thread(ref t) => t.peers(), [INFO] [stderr] 39 | Generic::Process(ref p) => p.peers(), [INFO] [stderr] 40 | Generic::ProcessBinary(ref pb) => pb.peers(), [INFO] [stderr] 41 | Generic::ZeroCopy(ref z) => z.peers(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/generic.rs:45:59 [INFO] [stderr] | [INFO] [stderr] 45 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:46:9 [INFO] [stderr] | [INFO] [stderr] 46 | / match self { [INFO] [stderr] 47 | | &mut Generic::Thread(ref mut t) => t.allocate(identifier), [INFO] [stderr] 48 | | &mut Generic::Process(ref mut p) => p.allocate(identifier), [INFO] [stderr] 49 | | &mut Generic::ProcessBinary(ref mut pb) => pb.allocate(identifier), [INFO] [stderr] 50 | | &mut Generic::ZeroCopy(ref mut z) => z.allocate(identifier), [INFO] [stderr] 51 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 46 | match *self { [INFO] [stderr] 47 | Generic::Thread(ref mut t) => t.allocate(identifier), [INFO] [stderr] 48 | Generic::Process(ref mut p) => p.allocate(identifier), [INFO] [stderr] 49 | Generic::ProcessBinary(ref mut pb) => pb.allocate(identifier), [INFO] [stderr] 50 | Generic::ZeroCopy(ref mut z) => z.allocate(identifier), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:55:9 [INFO] [stderr] | [INFO] [stderr] 55 | / match self { [INFO] [stderr] 56 | | &mut Generic::Thread(ref mut t) => t.pre_work(), [INFO] [stderr] 57 | | &mut Generic::Process(ref mut p) => p.pre_work(), [INFO] [stderr] 58 | | &mut Generic::ProcessBinary(ref mut pb) => pb.pre_work(), [INFO] [stderr] 59 | | &mut Generic::ZeroCopy(ref mut z) => z.pre_work(), [INFO] [stderr] 60 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 55 | match *self { [INFO] [stderr] 56 | Generic::Thread(ref mut t) => t.pre_work(), [INFO] [stderr] 57 | Generic::Process(ref mut p) => p.pre_work(), [INFO] [stderr] 58 | Generic::ProcessBinary(ref mut pb) => pb.pre_work(), [INFO] [stderr] 59 | Generic::ZeroCopy(ref mut z) => z.pre_work(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/allocator/generic.rs:64:9 [INFO] [stderr] | [INFO] [stderr] 64 | / match self { [INFO] [stderr] 65 | | &mut Generic::Thread(ref mut t) => t.post_work(), [INFO] [stderr] 66 | | &mut Generic::Process(ref mut p) => p.post_work(), [INFO] [stderr] 67 | | &mut Generic::ProcessBinary(ref mut pb) => pb.post_work(), [INFO] [stderr] 68 | | &mut Generic::ZeroCopy(ref mut z) => z.post_work(), [INFO] [stderr] 69 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 64 | match *self { [INFO] [stderr] 65 | Generic::Thread(ref mut t) => t.post_work(), [INFO] [stderr] 66 | Generic::Process(ref mut p) => p.post_work(), [INFO] [stderr] 67 | Generic::ProcessBinary(ref mut pb) => pb.post_work(), [INFO] [stderr] 68 | Generic::ZeroCopy(ref mut z) => z.post_work(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/generic.rs:76:59 [INFO] [stderr] | [INFO] [stderr] 76 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: you should consider deriving a `Default` implementation for `allocator::zero_copy::bytes_exchange::Signal` [INFO] [stderr] --> src/allocator/zero_copy/bytes_exchange.rs:37:5 [INFO] [stderr] | [INFO] [stderr] 37 | / pub fn new() -> Self { [INFO] [stderr] 38 | | Signal { thread: Arc::new(RwLock::new(None)) } [INFO] [stderr] 39 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_without_default_derive)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default_derive [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 31 | #[derive(Default)] [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:30:5 [INFO] [stderr] | [INFO] [stderr] 30 | logger.as_mut().map(|l| l.log(StateEvent { send: false, process, remote, start: true })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: false, process, remote, start: true }) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::option_map_unit_fn)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:75:13 [INFO] [stderr] | [INFO] [stderr] 75 | logger.as_mut().map(|logger| { [INFO] [stderr] | _____________^ [INFO] [stderr] | |_____________| [INFO] [stderr] | || [INFO] [stderr] 76 | || logger.log(MessageEvent { is_send: false, header, }); [INFO] [stderr] 77 | || }); [INFO] [stderr] | ||______________^- help: try this: `if let Some(logger) = logger.as_mut() { logger.log(MessageEvent { is_send: false, header, }); }` [INFO] [stderr] | |_______________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:104:5 [INFO] [stderr] | [INFO] [stderr] 104 | logger.as_mut().map(|l| l.log(StateEvent { send: false, process, remote, start: false, })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: false, process, remote, start: false, }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:122:5 [INFO] [stderr] | [INFO] [stderr] 122 | logger.as_mut().map(|l| l.log(StateEvent { send: true, process, remote, start: true, })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: true, process, remote, start: true, }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:153:17 [INFO] [stderr] | [INFO] [stderr] 153 | logger.as_mut().map(|logger| { [INFO] [stderr] | _________________^ [INFO] [stderr] | |_________________| [INFO] [stderr] | || [INFO] [stderr] 154 | || let mut offset = 0; [INFO] [stderr] 155 | || while let Some(header) = MessageHeader::try_read(&mut bytes[offset..]) { [INFO] [stderr] 156 | || logger.log(MessageEvent { is_send: true, header, }); [INFO] [stderr] 157 | || offset += header.required_bytes(); [INFO] [stderr] 158 | || } [INFO] [stderr] 159 | || }); [INFO] [stderr] | ||__________________^- help: try this: `if let Some(logger) = logger.as_mut() { ... }` [INFO] [stderr] | |___________________| [INFO] [stderr] | [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:179:5 [INFO] [stderr] | [INFO] [stderr] 179 | logger.as_mut().map(|logger| logger.log(MessageEvent { is_send: true, header })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(logger) = logger.as_mut() { logger.log(MessageEvent { is_send: true, header }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: called `map(f)` on an Option value where `f` is a unit closure [INFO] [stderr] --> src/allocator/zero_copy/tcp.rs:182:5 [INFO] [stderr] | [INFO] [stderr] 182 | logger.as_mut().map(|l| l.log(StateEvent { send: true, process, remote, start: false, })); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- [INFO] [stderr] | | [INFO] [stderr] | help: try this: `if let Some(l) = logger.as_mut() { l.log(StateEvent { send: true, process, remote, start: false, }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/zero_copy/allocator.rs:38:4 [INFO] [stderr] | [INFO] [stderr] 38 | -> (Vec>, Vec<(Vec, Signal)>, Vec>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/zero_copy/allocator.rs:122:59 [INFO] [stderr] | [INFO] [stderr] 122 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: the loop variable `source` is only used to index `sends`. [INFO] [stderr] --> src/allocator/zero_copy/allocator_process.rs:45:23 [INFO] [stderr] | [INFO] [stderr] 45 | for source in 0 .. count { [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] 45 | for in sends.iter_mut().take(count) { [INFO] [stderr] | ^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/zero_copy/allocator_process.rs:117:59 [INFO] [stderr] | [INFO] [stderr] 117 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>) { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: the loop variable `index` is used to index `results` [INFO] [stderr] --> src/allocator/zero_copy/initialize.rs:58:18 [INFO] [stderr] | [INFO] [stderr] 58 | for index in 0..results.len() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [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] 58 | for (index, ) in results.iter_mut().enumerate() { [INFO] [stderr] | ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/allocator/mod.rs:37:59 [INFO] [stderr] | [INFO] [stderr] 37 | fn allocate(&mut self, identifier: usize) -> (Vec>>>, Box>>); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/networking.rs:35:26 [INFO] [stderr] | [INFO] [stderr] 35 | Some(header.clone()) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*header` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/networking.rs:111:26 [INFO] [stderr] | [INFO] [stderr] 111 | let identifier = unsafe { decode::(&mut buffer) }.expect("failed to decode worker index").0.clone() as usize; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*unsafe { decode::(&mut buffer) }.expect("failed to decode worker index").0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/initialize.rs:105:66 [INFO] [stderr] | [INFO] [stderr] 105 | Ok((Process::new_vector(threads).into_iter().map(|x| GenericBuilder::Process(x)).collect(), Box::new(()))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `GenericBuilder::Process` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/initialize.rs:109:47 [INFO] [stderr] | [INFO] [stderr] 109 | Ok((stuff.into_iter().map(|x| GenericBuilder::ZeroCopy(x)).collect(), Box::new(guard))) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `GenericBuilder::ZeroCopy` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/message.rs:30:5 [INFO] [stderr] | [INFO] [stderr] 30 | / pub fn swap<'b>(self, element: &'b mut T) { [INFO] [stderr] 31 | | match self { [INFO] [stderr] 32 | | RefOrMut::Ref(reference) => element.clone_from(reference), [INFO] [stderr] 33 | | RefOrMut::Mut(reference) => ::std::mem::swap(reference, element), [INFO] [stderr] 34 | | }; [INFO] [stderr] 35 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: methods called `into_*` usually take self by value; consider choosing a less ambiguous name [INFO] [stderr] --> src/message.rs:124:44 [INFO] [stderr] | [INFO] [stderr] 124 | pub fn into_bytes(&self, writer: &mut W) { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::wrong_self_convention)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stderr] [INFO] [stderr] warning: defining a method called `as_mut` on this type; consider implementing the `std::convert::AsMut` trait or choosing a less ambiguous name [INFO] [stderr] --> src/message.rs:199:5 [INFO] [stderr] | [INFO] [stderr] 199 | / pub fn as_mut(&mut self) -> &mut T { [INFO] [stderr] 200 | | [INFO] [stderr] 201 | | let cloned: Option = match &self.payload { [INFO] [stderr] 202 | | MessageContents::Binary(bytes) => Some((*bytes).clone()), [INFO] [stderr] ... | [INFO] [stderr] 217 | | } [INFO] [stderr] 218 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: the loop variable `i` is used to index `senders` [INFO] [stderr] --> examples/hello.rs:18:18 [INFO] [stderr] | [INFO] [stderr] 18 | for i in 0 .. allocator.peers() { [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] 18 | for (i, ) in senders.iter_mut().enumerate().take(allocator.peers()) { [INFO] [stderr] | ^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 6.50s [INFO] running `"docker" "inspect" "6dfae02d851beee8ef438b8f4df4cdd3754ff045dbef6af391efa5cbb32c2cde"` [INFO] running `"docker" "rm" "-f" "6dfae02d851beee8ef438b8f4df4cdd3754ff045dbef6af391efa5cbb32c2cde"` [INFO] [stdout] 6dfae02d851beee8ef438b8f4df4cdd3754ff045dbef6af391efa5cbb32c2cde