[INFO] fetching crate ztimer 0.1.2... [INFO] linting ztimer-0.1.2 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate ztimer 0.1.2 into /workspace/builds/worker-4-tc1/source [INFO] started tweaking crates.io crate ztimer 0.1.2 [INFO] finished tweaking crates.io crate ztimer 0.1.2 [INFO] tweaked toml for crates.io crate ztimer 0.1.2 written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate ztimer 0.1.2 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "generate-lockfile" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Locking 101 packages to latest compatible versions [INFO] [stderr] Adding thiserror v1.0.69 (available: v2.0.18) [INFO] [stderr] Adding thread-priority v0.16.0 (available: v3.0.0) [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded portable-atomic-util v0.2.6 [INFO] [stderr] Downloaded rblist v0.1.0 [INFO] [stderr] Downloaded taskchain v0.1.4 [INFO] [stderr] Downloaded thread-priority v0.16.0 [INFO] [stderr] Downloaded jiff-static v0.2.23 [INFO] [stderr] Downloaded jiff v0.2.23 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] cf67fb391f86f97c4fc136c078cd78a37e0e64be80579e274783d67f4253a4f0 [INFO] running `Command { std: "docker" "start" "-a" "cf67fb391f86f97c4fc136c078cd78a37e0e64be80579e274783d67f4253a4f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "cf67fb391f86f97c4fc136c078cd78a37e0e64be80579e274783d67f4253a4f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "cf67fb391f86f97c4fc136c078cd78a37e0e64be80579e274783d67f4253a4f0", kill_on_drop: false }` [INFO] [stdout] cf67fb391f86f97c4fc136c078cd78a37e0e64be80579e274783d67f4253a4f0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c7ab58d8fc6f0528c8c945e29a3ef90926ce76c95fbd53680efb30ce1369013f [INFO] running `Command { std: "docker" "start" "-a" "c7ab58d8fc6f0528c8c945e29a3ef90926ce76c95fbd53680efb30ce1369013f", kill_on_drop: false }` [INFO] [stderr] Compiling syn v2.0.117 [INFO] [stderr] Checking memchr v2.8.0 [INFO] [stderr] Compiling libc v0.2.183 [INFO] [stderr] Checking anstyle v1.0.14 [INFO] [stderr] Compiling anyhow v1.0.102 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling cc v1.2.57 [INFO] [stderr] Compiling serde_json v1.0.149 [INFO] [stderr] Checking clap_lex v1.1.0 [INFO] [stderr] Checking strum v0.28.0 [INFO] [stderr] Checking crossbeam-channel v0.5.15 [INFO] [stderr] Checking clap_builder v4.6.0 [INFO] [stderr] Checking bitflags v2.11.0 [INFO] [stderr] Checking anstyle-query v1.1.5 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking is_terminal_polyfill v1.70.2 [INFO] [stderr] Checking colorchoice v1.0.5 [INFO] [stderr] Checking anstream v0.6.21 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking crossbeam v0.8.4 [INFO] [stderr] Checking yansi v1.0.1 [INFO] [stderr] Compiling alloca v0.4.0 [INFO] [stderr] Checking diff v0.1.13 [INFO] [stderr] Checking thread-priority v0.16.0 [INFO] [stderr] Checking num_cpus v1.17.0 [INFO] [stderr] Checking page_size v0.6.0 [INFO] [stderr] Checking once_cell v1.21.4 [INFO] [stderr] Checking jiff v0.2.23 [INFO] [stderr] Checking pretty_assertions v1.4.1 [INFO] [stderr] Checking regex-automata v0.4.14 [INFO] [stderr] Checking clap v4.6.0 [INFO] [stderr] Compiling zerocopy-derive v0.8.42 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling strum_macros v0.28.0 [INFO] [stderr] Checking regex v1.12.3 [INFO] [stderr] Checking env_filter v1.0.0 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking env_logger v0.11.9 [INFO] [stderr] Checking zerocopy v0.8.42 [INFO] [stderr] Checking rblist v0.1.0 [INFO] [stderr] Checking taskchain v0.1.4 [INFO] [stderr] Checking ztimer v0.1.2 (/opt/rustwide/workdir) [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | pub(self) use clock::Scheduler; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = note: `#[warn(clippy::needless_pub_self)]` on by default [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | pub(self) use stats::{Counter, Stats}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | pub(self) mod stats; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:39:1 [INFO] [stdout] | [INFO] [stdout] 39 | pub(self) use super::MyError; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | pub(self) use super::NonBlockTickBridge; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | pub(self) use tick::{Interval, DURATION_PER_TICK, TICKS_PER_SECOND}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | pub(self) use timer::{TimerHandle, TPL}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/lib.rs:74:1 [INFO] [stdout] | [INFO] [stdout] 74 | pub(self) use inner::{timer, ClockPtr}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | / /// Returns `Ok(Timer)` if successful, or an error if creation fails. [INFO] [stdout] 158 | | [INFO] [stdout] | |_^ [INFO] [stdout] 159 | pub fn new(clk: Clock, duration: Duration, f: F, name: String) -> AnyResult [INFO] [stdout] | ---------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/inner/clock.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | if !r.is_ok() { [INFO] [stdout] | ^^^^^^^^^^ help: try: `r.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/inner/clock.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | clock.num -= expired.len() as isize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `expired.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/inner/clock.rs:357:18 [INFO] [stdout] | [INFO] [stdout] 357 | .expect((format!("The scheduler of {:?} must be presented", expire_at)).as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("The scheduler of {:?} must be presented", expire_at))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/inner/srcell.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | self.0.try_borrow_mut().or_else(|e| Err(e.into())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.0.try_borrow_mut().map_err(|e| e.into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/inner/srcell.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | self.0.try_borrow().or_else(|e| Err(e.into())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.0.try_borrow().map_err(|e| e.into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `COUNTERS` [INFO] [stdout] --> src/inner/stats.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 147 - for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] 147 + for (i, ) in COUNTERS.iter().enumerate().take(Counter::NumOfCounters as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:157:53 [INFO] [stdout] | [INFO] [stdout] 157 | self.counter[i as usize] += rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:157:26 [INFO] [stdout] | [INFO] [stdout] 157 | self.counter[i as usize] += rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:166:53 [INFO] [stdout] | [INFO] [stdout] 166 | self.counter[i as usize] -= rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:166:26 [INFO] [stdout] | [INFO] [stdout] 166 | self.counter[i as usize] -= rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/inner/stats.rs:226:9 [INFO] [stdout] | [INFO] [stdout] 208 | / let r = Self { [INFO] [stdout] 209 | | collection: RingArray::new( [INFO] [stdout] 210 | | InAndOut { [INFO] [stdout] 211 | | start: now, [INFO] [stdout] ... | [INFO] [stdout] 224 | | ..Default::default() [INFO] [stdout] 225 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 226 | r [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 208 ~ [INFO] [stdout] 209 ~ Self { [INFO] [stdout] 210 + collection: RingArray::new( [INFO] [stdout] 211 + InAndOut { [INFO] [stdout] 212 + start: now, [INFO] [stdout] 213 + end: now, [INFO] [stdout] 214 + ..Default::default() [INFO] [stdout] 215 + }, [INFO] [stdout] 216 + |ra| { [INFO] [stdout] 217 + ra.buffer[0].end = ra.buffer[0].start.until(PERIOD); [INFO] [stdout] 218 + }, [INFO] [stdout] 219 + ), [INFO] [stdout] 220 + period: InAndOut { [INFO] [stdout] 221 + start: now, [INFO] [stdout] 222 + end: now, [INFO] [stdout] 223 + ..Default::default() [INFO] [stdout] 224 + }, [INFO] [stdout] 225 + ..Default::default() [INFO] [stdout] 226 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `sum` [INFO] [stdout] --> src/inner/stats.rs:231:22 [INFO] [stdout] | [INFO] [stdout] 231 | for j in 0..Counter::NumOfCounters as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 231 - for j in 0..Counter::NumOfCounters as usize { [INFO] [stdout] 231 + for (j, ) in sum.iter_mut().enumerate().take(Counter::NumOfCounters as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `avg` [INFO] [stdout] --> src/inner/stats.rs:298:18 [INFO] [stdout] | [INFO] [stdout] 298 | for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 298 - for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] 298 + for (i, ) in avg.iter_mut().enumerate().take(Counter::NumOfCounters as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/inner/ticker.rs:32:41 [INFO] [stdout] | [INFO] [stdout] 32 | static TICKER: Lazy = Lazy::new(|| Ticker::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Ticker::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/inner/ticker.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / if num > 16 { [INFO] [stdout] 37 | | num = 16; [INFO] [stdout] 38 | | } else if num < 2 { [INFO] [stdout] 39 | | num = 2; [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ help: replace with clamp: `num = num.clamp(2, 16);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/inner/ticker.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | return jh; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return jh; [INFO] [stdout] 193 + jh [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `txes` [INFO] [stdout] --> src/inner/ticker.rs:251:22 [INFO] [stdout] | [INFO] [stdout] 251 | for i in 0..(*NUM_OF_BROKER) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 251 - for i in 0..(*NUM_OF_BROKER) { [INFO] [stdout] 251 + for (i, ) in txes.iter().enumerate().take((*NUM_OF_BROKER)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/inner/ticker.rs:422:9 [INFO] [stdout] | [INFO] [stdout] 422 | return (at, min); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 422 - return (at, min); [INFO] [stdout] 422 + (at, min) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/inner/ticker.rs:412:12 [INFO] [stdout] | [INFO] [stdout] 412 | if npb.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `npb.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `npb` [INFO] [stdout] --> src/inner/ticker.rs:416:18 [INFO] [stdout] | [INFO] [stdout] 416 | for i in 0..npb.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 416 - for i in 0..npb.len() { [INFO] [stdout] 416 + for (i, ) in npb.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/inner/ticker.rs:428:12 [INFO] [stdout] | [INFO] [stdout] 428 | if npb.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `npb.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `npb` [INFO] [stdout] --> src/inner/ticker.rs:432:18 [INFO] [stdout] | [INFO] [stdout] 432 | for i in 0..npb.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 432 - for i in 0..npb.len() { [INFO] [stdout] 432 + for (i, ) in npb.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pin<&Mutex>` which implements the `Copy` trait [INFO] [stdout] --> src/inner/ticker.rs:482:23 [INFO] [stdout] | [INFO] [stdout] 482 | dc.1.push(clk.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `clk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/inner/ticker.rs:486:17 [INFO] [stdout] | [INFO] [stdout] 486 | dc.0 = dc.0 % (dc.1.len() as u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dc.0 %= (dc.1.len() as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `existing_clk` after checking its variant with `is_some` [INFO] [stdout] --> src/inner/ticker.rs:501:35 [INFO] [stdout] | [INFO] [stdout] 500 | if existing_clk.is_some() { [INFO] [stdout] | ------------------------- help: try: `if let Some() = existing_clk` [INFO] [stdout] 501 | return Ok((false, existing_clk.unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/inner/tick.rs:44:36 [INFO] [stdout] | [INFO] [stdout] 44 | pub(in super::super) fn to_u64(&self) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/inner/tick.rs:68:36 [INFO] [stdout] | [INFO] [stdout] 68 | pub(in super::super) fn to_i64(&self) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/inner/tick.rs:99:38 [INFO] [stdout] | [INFO] [stdout] 99 | Interval(self.0.wrapping_mul(rhs as i64)) [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/inner/timer.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | / self.q.unsafe_upgrade().map_or(false, |q| { [INFO] [stdout] 107 | | q.unsafe_try_borrow().map_or_else( [INFO] [stdout] 108 | | |e| { [INFO] [stdout] 109 | | warn!( [INFO] [stdout] ... | [INFO] [stdout] 117 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 106 - self.q.unsafe_upgrade().map_or(false, |q| { [INFO] [stdout] 106 + self.q.unsafe_upgrade().is_some_and(|q| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TPL` contains a capitalized acronym [INFO] [stdout] --> src/inner/timer.rs:206:29 [INFO] [stdout] | [INFO] [stdout] 206 | pub(in super::super) struct TPL { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Tpl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:163:63 [INFO] [stdout] | [INFO] [stdout] 163 | inner::Clock::new_timer(clk.0, duration, f, name).map(|t| Timer(t)) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `Timer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:212:48 [INFO] [stdout] | [INFO] [stdout] 212 | Timer::new(clk, duration, f, name).map(|t| Self::from_timer(t)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::from_timer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:236:27 [INFO] [stdout] | [INFO] [stdout] 236 | self.0.take().map(|t| Timer(t)) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `Timer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/lib.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 262 | /// with application thread, otherwise, None. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 262 | /// with application thread, otherwise, None. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:268:35 [INFO] [stdout] | [INFO] [stdout] 268 | inner::Clock::new(tb).map(|c| Self(c)) [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Clock` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/lib.rs:296:5 [INFO] [stdout] | [INFO] [stdout] 296 | pub fn len(self) -> isize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/inner/clock.rs:51:26 [INFO] [stdout] | [INFO] [stdout] 51 | id: unsafe { CLOCK_ID.fetch_add(1, Ordering::Relaxed) }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/inner/clock.rs:117:26 [INFO] [stdout] | [INFO] [stdout] 117 | id: unsafe { CLOCK_ID.fetch_add(1, Ordering::Relaxed) }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking tinytemplate v1.2.1 [INFO] [stderr] Checking half v2.7.1 [INFO] [stderr] Checking ciborium-ll v0.2.2 [INFO] [stderr] Checking ciborium v0.2.2 [INFO] [stderr] Checking criterion v0.8.2 [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:18:1 [INFO] [stdout] | [INFO] [stdout] 18 | pub(self) use clock::Scheduler; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = note: `#[warn(clippy::needless_pub_self)]` on by default [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:30:1 [INFO] [stdout] | [INFO] [stdout] 30 | pub(self) use stats::{Counter, Stats}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | pub(self) mod stats; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/inner/stats.rs:363:1 [INFO] [stdout] | [INFO] [stdout] 363 | / #[cfg(test)] [INFO] [stdout] 364 | | [INFO] [stdout] | |_^ [INFO] [stdout] 365 | mod tests { [INFO] [stdout] | --------- the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_outer_attr)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:39:1 [INFO] [stdout] | [INFO] [stdout] 39 | pub(self) use super::MyError; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | pub(self) use super::NonBlockTickBridge; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | pub(self) use tick::{Interval, DURATION_PER_TICK, TICKS_PER_SECOND}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/inner/mod.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | pub(self) use timer::{TimerHandle, TPL}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `pub(self)` [INFO] [stdout] --> src/lib.rs:74:1 [INFO] [stdout] | [INFO] [stdout] 74 | pub(self) use inner::{timer, ClockPtr}; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pub_self [INFO] [stdout] = help: remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/lib.rs:157:5 [INFO] [stdout] | [INFO] [stdout] 157 | / /// Returns `Ok(Timer)` if successful, or an error if creation fails. [INFO] [stdout] 158 | | [INFO] [stdout] | |_^ [INFO] [stdout] 159 | pub fn new(clk: Clock, duration: Duration, f: F, name: String) -> AnyResult [INFO] [stdout] | ---------- the comment documents this function [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after outer attribute [INFO] [stdout] --> src/lib.rs:315:1 [INFO] [stdout] | [INFO] [stdout] 315 | / #[cfg(all(test, not(feature = "mock_clock")))] [INFO] [stdout] 316 | | [INFO] [stdout] | |_^ [INFO] [stdout] 317 | mod test { [INFO] [stdout] | -------- the attribute applies to this module [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_outer_attr [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/inner/clock.rs:74:12 [INFO] [stdout] | [INFO] [stdout] 74 | if !r.is_ok() { [INFO] [stdout] | ^^^^^^^^^^ help: try: `r.is_err()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`isize` -> `isize`) [INFO] [stdout] --> src/inner/clock.rs:224:26 [INFO] [stdout] | [INFO] [stdout] 224 | clock.num -= expired.len() as isize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `expired.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function call inside of `expect` [INFO] [stdout] --> src/inner/clock.rs:357:18 [INFO] [stdout] | [INFO] [stdout] 357 | .expect((format!("The scheduler of {:?} must be presented", expire_at)).as_str()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| panic!("The scheduler of {:?} must be presented", expire_at))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#expect_fun_call [INFO] [stdout] = note: `#[warn(clippy::expect_fun_call)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary use of `get(&expire_at).is_none()` [INFO] [stdout] --> src/inner/clock.rs:547:33 [INFO] [stdout] | [INFO] [stdout] 547 | assert!(guard.conductor.get(&expire_at).is_none()); [INFO] [stdout] | ----------------^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: replace it with: `!guard.conductor.contains_key(&expire_at)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check [INFO] [stdout] = note: `#[warn(clippy::unnecessary_get_then_check)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/inner/clock.rs:654:17 [INFO] [stdout] | [INFO] [stdout] 654 | format!("[Group:{}-Timer:{}]", group, i).into(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `format!("[Group:{}-Timer:{}]", group, i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/inner/srcell.rs:49:9 [INFO] [stdout] | [INFO] [stdout] 49 | self.0.try_borrow_mut().or_else(|e| Err(e.into())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.0.try_borrow_mut().map_err(|e| e.into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] = note: `#[warn(clippy::bind_instead_of_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `Result.or_else(|x| Err(y))`, which is more succinctly expressed as `map_err(|x| y)` [INFO] [stdout] --> src/inner/srcell.rs:52:9 [INFO] [stdout] | [INFO] [stdout] 52 | self.0.try_borrow().or_else(|e| Err(e.into())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.0.try_borrow().map_err(|e| e.into())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `COUNTERS` [INFO] [stdout] --> src/inner/stats.rs:147:18 [INFO] [stdout] | [INFO] [stdout] 147 | for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 147 - for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] 147 + for (i, ) in COUNTERS.iter().enumerate().take(Counter::NumOfCounters as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:157:53 [INFO] [stdout] | [INFO] [stdout] 157 | self.counter[i as usize] += rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:157:26 [INFO] [stdout] | [INFO] [stdout] 157 | self.counter[i as usize] += rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:166:53 [INFO] [stdout] | [INFO] [stdout] 166 | self.counter[i as usize] -= rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/inner/stats.rs:166:26 [INFO] [stdout] | [INFO] [stdout] 166 | self.counter[i as usize] -= rhs.counter[i as usize]; [INFO] [stdout] | ^^^^^^^^^^ help: try: `i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/inner/stats.rs:226:9 [INFO] [stdout] | [INFO] [stdout] 208 | / let r = Self { [INFO] [stdout] 209 | | collection: RingArray::new( [INFO] [stdout] 210 | | InAndOut { [INFO] [stdout] 211 | | start: now, [INFO] [stdout] ... | [INFO] [stdout] 224 | | ..Default::default() [INFO] [stdout] 225 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 226 | r [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 208 ~ [INFO] [stdout] 209 ~ Self { [INFO] [stdout] 210 + collection: RingArray::new( [INFO] [stdout] 211 + InAndOut { [INFO] [stdout] 212 + start: now, [INFO] [stdout] 213 + end: now, [INFO] [stdout] 214 + ..Default::default() [INFO] [stdout] 215 + }, [INFO] [stdout] 216 + |ra| { [INFO] [stdout] 217 + ra.buffer[0].end = ra.buffer[0].start.until(PERIOD); [INFO] [stdout] 218 + }, [INFO] [stdout] 219 + ), [INFO] [stdout] 220 + period: InAndOut { [INFO] [stdout] 221 + start: now, [INFO] [stdout] 222 + end: now, [INFO] [stdout] 223 + ..Default::default() [INFO] [stdout] 224 + }, [INFO] [stdout] 225 + ..Default::default() [INFO] [stdout] 226 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `sum` [INFO] [stdout] --> src/inner/stats.rs:231:22 [INFO] [stdout] | [INFO] [stdout] 231 | for j in 0..Counter::NumOfCounters as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 231 - for j in 0..Counter::NumOfCounters as usize { [INFO] [stdout] 231 + for (j, ) in sum.iter_mut().enumerate().take(Counter::NumOfCounters as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `avg` [INFO] [stdout] --> src/inner/stats.rs:298:18 [INFO] [stdout] | [INFO] [stdout] 298 | for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 298 - for i in 0..Counter::NumOfCounters as usize { [INFO] [stdout] 298 + for (i, ) in avg.iter_mut().enumerate().take(Counter::NumOfCounters as usize) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field assignment outside of initializer for an instance created with Default::default() [INFO] [stdout] --> src/inner/stats.rs:437:9 [INFO] [stdout] | [INFO] [stdout] 437 | in_and_out.start = now; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: consider initializing the variable with `inner::stats::InAndOut { start: now, end: now.until(1.into()), ..Default::default() }` and removing relevant reassignments [INFO] [stdout] --> src/inner/stats.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 436 | let mut in_and_out = InAndOut::default(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default [INFO] [stdout] = note: `#[warn(clippy::field_reassign_with_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:660:46 [INFO] [stdout] | [INFO] [stdout] 660 | assert_eq!(rate_monitor.rate(), [0 as u32, 0 as u32, 0 as u32]); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:660:56 [INFO] [stdout] | [INFO] [stdout] 660 | assert_eq!(rate_monitor.rate(), [0 as u32, 0 as u32, 0 as u32]); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:660:66 [INFO] [stdout] | [INFO] [stdout] 660 | assert_eq!(rate_monitor.rate(), [0 as u32, 0 as u32, 0 as u32]); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/inner/stats.rs:680:34 [INFO] [stdout] | [INFO] [stdout] 680 | now = now.until(Interval(PERIOD.0 * 1)); [INFO] [stdout] | ^^^^^^^^^^^^ help: consider reducing it to: `PERIOD.0` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:703:26 [INFO] [stdout] | [INFO] [stdout] 703 | 0..=2 => 0 as u32, [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!Range::contains` implementation [INFO] [stdout] --> src/inner/stats.rs:709:16 [INFO] [stdout] | [INFO] [stdout] 709 | if i >= RING_SIZE * 2 || i < 2 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(2..RING_SIZE * 2).contains(&i)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:710:40 [INFO] [stdout] | [INFO] [stdout] 710 | assert_eq!(rm.rate(), [0 as u32, 0 as u32, 0 as u32]); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:710:50 [INFO] [stdout] | [INFO] [stdout] 710 | assert_eq!(rm.rate(), [0 as u32, 0 as u32, 0 as u32]); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `u32` is unnecessary [INFO] [stdout] --> src/inner/stats.rs:710:60 [INFO] [stdout] | [INFO] [stdout] 710 | assert_eq!(rm.rate(), [0 as u32, 0 as u32, 0 as u32]); [INFO] [stdout] | ^^^^^^^^ help: try: `0_u32` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/inner/ticker.rs:32:41 [INFO] [stdout] | [INFO] [stdout] 32 | static TICKER: Lazy = Lazy::new(|| Ticker::new()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Ticker::new` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/inner/ticker.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / if num > 16 { [INFO] [stdout] 37 | | num = 16; [INFO] [stdout] 38 | | } else if num < 2 { [INFO] [stdout] 39 | | num = 2; [INFO] [stdout] 40 | | } [INFO] [stdout] | |_____^ help: replace with clamp: `num = num.clamp(2, 16);` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/inner/ticker.rs:193:9 [INFO] [stdout] | [INFO] [stdout] 193 | return jh; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 193 - return jh; [INFO] [stdout] 193 + jh [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `txes` [INFO] [stdout] --> src/inner/ticker.rs:251:22 [INFO] [stdout] | [INFO] [stdout] 251 | for i in 0..(*NUM_OF_BROKER) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 251 - for i in 0..(*NUM_OF_BROKER) { [INFO] [stdout] 251 + for (i, ) in txes.iter().enumerate().take((*NUM_OF_BROKER)) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/inner/ticker.rs:422:9 [INFO] [stdout] | [INFO] [stdout] 422 | return (at, min); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 422 - return (at, min); [INFO] [stdout] 422 + (at, min) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/inner/ticker.rs:412:12 [INFO] [stdout] | [INFO] [stdout] 412 | if npb.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `npb.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `npb` [INFO] [stdout] --> src/inner/ticker.rs:416:18 [INFO] [stdout] | [INFO] [stdout] 416 | for i in 0..npb.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 416 - for i in 0..npb.len() { [INFO] [stdout] 416 + for (i, ) in npb.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/inner/ticker.rs:428:12 [INFO] [stdout] | [INFO] [stdout] 428 | if npb.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `npb.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `npb` [INFO] [stdout] --> src/inner/ticker.rs:432:18 [INFO] [stdout] | [INFO] [stdout] 432 | for i in 0..npb.len() { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 432 - for i in 0..npb.len() { [INFO] [stdout] 432 + for (i, ) in npb.iter().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `Pin<&Mutex>` which implements the `Copy` trait [INFO] [stdout] --> src/inner/ticker.rs:482:23 [INFO] [stdout] | [INFO] [stdout] 482 | dc.1.push(clk.clone()); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `clk` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/inner/ticker.rs:486:17 [INFO] [stdout] | [INFO] [stdout] 486 | dc.0 = dc.0 % (dc.1.len() as u32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `dc.0 %= (dc.1.len() as u32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `existing_clk` after checking its variant with `is_some` [INFO] [stdout] --> src/inner/ticker.rs:501:35 [INFO] [stdout] | [INFO] [stdout] 500 | if existing_clk.is_some() { [INFO] [stdout] | ------------------------- help: try: `if let Some() = existing_clk` [INFO] [stdout] 501 | return Ok((false, existing_clk.unwrap())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/inner/tick.rs:44:36 [INFO] [stdout] | [INFO] [stdout] 44 | pub(in super::super) fn to_u64(&self) -> u64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/inner/tick.rs:68:36 [INFO] [stdout] | [INFO] [stdout] 68 | pub(in super::super) fn to_i64(&self) -> i64 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/inner/tick.rs:99:38 [INFO] [stdout] | [INFO] [stdout] 99 | Interval(self.0.wrapping_mul(rhs as i64)) [INFO] [stdout] | ^^^^^^^^^^ help: try: `rhs` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `map_or` can be simplified [INFO] [stdout] --> src/inner/timer.rs:106:9 [INFO] [stdout] | [INFO] [stdout] 106 | / self.q.unsafe_upgrade().map_or(false, |q| { [INFO] [stdout] 107 | | q.unsafe_try_borrow().map_or_else( [INFO] [stdout] 108 | | |e| { [INFO] [stdout] 109 | | warn!( [INFO] [stdout] ... | [INFO] [stdout] 117 | | }) [INFO] [stdout] | |__________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or [INFO] [stdout] = note: `#[warn(clippy::unnecessary_map_or)]` on by default [INFO] [stdout] help: use `is_some_and` instead [INFO] [stdout] | [INFO] [stdout] 106 - self.q.unsafe_upgrade().map_or(false, |q| { [INFO] [stdout] 106 + self.q.unsafe_upgrade().is_some_and(|q| { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `TPL` contains a capitalized acronym [INFO] [stdout] --> src/inner/timer.rs:206:29 [INFO] [stdout] | [INFO] [stdout] 206 | pub(in super::super) struct TPL { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Tpl` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:163:63 [INFO] [stdout] | [INFO] [stdout] 163 | inner::Clock::new_timer(clk.0, duration, f, name).map(|t| Timer(t)) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `Timer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:212:48 [INFO] [stdout] | [INFO] [stdout] 212 | Timer::new(clk, duration, f, name).map(|t| Self::from_timer(t)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `Self::from_timer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:236:27 [INFO] [stdout] | [INFO] [stdout] 236 | self.0.take().map(|t| Timer(t)) [INFO] [stdout] | ^^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `Timer` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/lib.rs:262:9 [INFO] [stdout] | [INFO] [stdout] 262 | /// with application thread, otherwise, None. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 262 | /// with application thread, otherwise, None. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/lib.rs:268:35 [INFO] [stdout] | [INFO] [stdout] 268 | inner::Clock::new(tb).map(|c| Self(c)) [INFO] [stdout] | ^^^^^^^^^^^ help: replace the closure with the tuple struct itself: `Self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `Clock` has a public `len` method, but no `is_empty` method [INFO] [stdout] --> src/lib.rs:296:5 [INFO] [stdout] | [INFO] [stdout] 296 | pub fn len(self) -> isize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stdout] = note: `#[warn(clippy::len_without_is_empty)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:499:14 [INFO] [stdout] | [INFO] [stdout] 499 | fns: Vec>)>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] = note: `#[warn(clippy::type_complexity)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:537:22 [INFO] [stdout] | [INFO] [stdout] 537 | let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 537 | / let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] 538 | | fns.push(Box::new(single_timer_timeout)); [INFO] [stdout] | |_________________________________________________^ help: consider using the `vec![]` macro: `let fns: Vec>)>> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] = note: `#[warn(clippy::vec_init_then_push)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:555:22 [INFO] [stdout] | [INFO] [stdout] 555 | let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:555:9 [INFO] [stdout] | [INFO] [stdout] 555 | / let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] 556 | | fns.push(Box::new(single_timer_cancel)); [INFO] [stdout] | |________________________________________________^ help: consider using the `vec![]` macro: `let fns: Vec>)>> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:576:22 [INFO] [stdout] | [INFO] [stdout] 576 | let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:576:9 [INFO] [stdout] | [INFO] [stdout] 576 | / let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] 577 | | fns.push(Box::new(single_timer_drop)); [INFO] [stdout] | |______________________________________________^ help: consider using the `vec![]` macro: `let fns: Vec>)>> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:597:22 [INFO] [stdout] | [INFO] [stdout] 597 | let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:597:9 [INFO] [stdout] | [INFO] [stdout] 597 | / let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] 598 | | fns.push(Box::new(single_timer_timeout)); [INFO] [stdout] 599 | | fns.push(Box::new(single_timer_cancel)); [INFO] [stdout] 600 | | fns.push(Box::new(single_timer_drop)); [INFO] [stdout] | |______________________________________________^ help: consider using the `vec![]` macro: `let fns: Vec>)>> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:612:14 [INFO] [stdout] | [INFO] [stdout] 612 | fns: Vec>)>>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stdout] --> src/lib.rs:685:22 [INFO] [stdout] | [INFO] [stdout] 685 | let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calls to `push` immediately after creation [INFO] [stdout] --> src/lib.rs:685:9 [INFO] [stdout] | [INFO] [stdout] 685 | / let mut fns: Vec>)>> = Vec::new(); [INFO] [stdout] 686 | | fns.push(Box::new(single_timer_timeout)); [INFO] [stdout] 687 | | fns.push(Box::new(single_timer_cancel)); [INFO] [stdout] 688 | | fns.push(Box::new(single_timer_drop)); [INFO] [stdout] | |______________________________________________^ help: consider using the `vec![]` macro: `let fns: Vec>)>> = vec![..];` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_init_then_push [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `&mut Mutex::lock` unnecessarily locks an exclusive (mutable) reference [INFO] [stdout] --> src/lib.rs:735:13 [INFO] [stdout] | [INFO] [stdout] 735 | jhs.lock().unwrap().push(jh); [INFO] [stdout] | ^^^^ help: change this to: `get_mut` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mut_mutex_lock [INFO] [stdout] = note: `#[warn(clippy::mut_mutex_lock)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`usize` -> `usize`) [INFO] [stdout] --> src/lib.rs:786:23 [INFO] [stdout] | [INFO] [stdout] 786 | let std = s / (errors.len() as usize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `errors.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/inner/clock.rs:51:26 [INFO] [stdout] | [INFO] [stdout] 51 | id: unsafe { CLOCK_ID.fetch_add(1, Ordering::Relaxed) }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/inner/clock.rs:117:26 [INFO] [stdout] | [INFO] [stdout] 117 | id: unsafe { CLOCK_ID.fetch_add(1, Ordering::Relaxed) }, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lib.rs:352:13 [INFO] [stdout] | [INFO] [stdout] 352 | SEQ.fetch_add(1, Ordering::Relaxed) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lib.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | SEQ.fetch_add(1, Ordering::Relaxed) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lib.rs:441:13 [INFO] [stdout] | [INFO] [stdout] 441 | SEQ.fetch_add(1, Ordering::Relaxed) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lib.rs:704:25 [INFO] [stdout] | [INFO] [stdout] 704 | SEQ.fetch_add(1, Ordering::Relaxed) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/lib.rs:711:33 [INFO] [stdout] | [INFO] [stdout] 711 | ... SEQ.fetch_add(1, Ordering::Relaxed) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 37.68s [INFO] running `Command { std: "docker" "inspect" "c7ab58d8fc6f0528c8c945e29a3ef90926ce76c95fbd53680efb30ce1369013f", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c7ab58d8fc6f0528c8c945e29a3ef90926ce76c95fbd53680efb30ce1369013f", kill_on_drop: false }` [INFO] [stdout] c7ab58d8fc6f0528c8c945e29a3ef90926ce76c95fbd53680efb30ce1369013f