[INFO] crate float_duration 0.3.3 is already in cache [INFO] extracting crate float_duration 0.3.3 into work/ex/clippy-test-run/sources/stable/reg/float_duration/0.3.3 [INFO] extracting crate float_duration 0.3.3 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/float_duration/0.3.3 [INFO] validating manifest of float_duration-0.3.3 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 float_duration-0.3.3 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 float_duration-0.3.3 [INFO] finished frobbing float_duration-0.3.3 [INFO] frobbed toml for float_duration-0.3.3 written to work/ex/clippy-test-run/sources/stable/reg/float_duration/0.3.3/Cargo.toml [INFO] started frobbing float_duration-0.3.3 [INFO] finished frobbing float_duration-0.3.3 [INFO] frobbed toml for float_duration-0.3.3 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/float_duration/0.3.3/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 float_duration-0.3.3 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-0/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/float_duration/0.3.3:/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] bc5bd1dd3c280088499aea9859637cbac3c9ad51cd34b55f749aaa7d3e27d18c [INFO] running `"docker" "start" "-a" "bc5bd1dd3c280088499aea9859637cbac3c9ad51cd34b55f749aaa7d3e27d18c"` [INFO] [stderr] Checking float_duration v0.3.3 (/opt/crater/workdir) [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/duration.rs:137:25 [INFO] [stderr] | [INFO] [stderr] 137 | FloatDuration { secs: secs } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `secs` [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/iter.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | start: start, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `start` [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/iter.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | step_size: step_size, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `step_size` [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/duration.rs:137:25 [INFO] [stderr] | [INFO] [stderr] 137 | FloatDuration { secs: secs } [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `secs` [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/iter.rs:24:13 [INFO] [stderr] | [INFO] [stderr] 24 | start: start, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `start` [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/iter.rs:25:13 [INFO] [stderr] | [INFO] [stderr] 25 | step_size: step_size, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `step_size` [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: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:160:21 [INFO] [stderr] | [INFO] [stderr] 160 | pub fn as_years(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:165:20 [INFO] [stderr] | [INFO] [stderr] 165 | pub fn as_days(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:170:21 [INFO] [stderr] | [INFO] [stderr] 170 | pub fn as_hours(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:175:23 [INFO] [stderr] | [INFO] [stderr] 175 | pub fn as_minutes(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:180:23 [INFO] [stderr] | [INFO] [stderr] 180 | pub fn as_seconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:185:28 [INFO] [stderr] | [INFO] [stderr] 185 | pub fn as_milliseconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:190:28 [INFO] [stderr] | [INFO] [stderr] 190 | pub fn as_microseconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:195:27 [INFO] [stderr] | [INFO] [stderr] 195 | pub fn as_nanoseconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:211:20 [INFO] [stderr] | [INFO] [stderr] 211 | pub fn is_zero(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:216:24 [INFO] [stderr] | [INFO] [stderr] 216 | pub fn is_positive(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:221:24 [INFO] [stderr] | [INFO] [stderr] 221 | pub fn is_negative(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:231:19 [INFO] [stderr] | [INFO] [stderr] 231 | pub fn signum(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:264:19 [INFO] [stderr] | [INFO] [stderr] 264 | pub fn to_std(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/duration.rs:285:32 [INFO] [stderr] | [INFO] [stderr] 285 | (duration.subsec_nanos() as f64) / NANOS_PER_SEC) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(duration.subsec_nanos())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:296:22 [INFO] [stderr] | [INFO] [stderr] 296 | pub fn to_chrono(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting f32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/duration.rs:339:35 [INFO] [stderr] | [INFO] [stderr] 339 | Ok(FloatDuration::seconds(value as f64)) [INFO] [stderr] | ^^^^^^^^^^^^ help: try: `f64::from(value)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/duration.rs:654:48 [INFO] [stderr] | [INFO] [stderr] 654 | assert_eq!(duration2.as_nanoseconds(), 55000000.0); [INFO] [stderr] | ^^^^^^^^^^ help: consider: `55_000_000.0` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/duration.rs:693:48 [INFO] [stderr] | [INFO] [stderr] 693 | FloatDuration::microseconds(500500.0)); [INFO] [stderr] | ^^^^^^^^ help: consider: `500_500.0` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/duration.rs:849:51 [INFO] [stderr] | [INFO] [stderr] 849 | chrono::Duration::microseconds(250050)); [INFO] [stderr] | ^^^^^^ help: consider: `250_050` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:160:21 [INFO] [stderr] | [INFO] [stderr] 160 | pub fn as_years(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::trivially_copy_pass_by_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:165:20 [INFO] [stderr] | [INFO] [stderr] 165 | pub fn as_days(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:170:21 [INFO] [stderr] | [INFO] [stderr] 170 | pub fn as_hours(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:175:23 [INFO] [stderr] | [INFO] [stderr] 175 | pub fn as_minutes(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:180:23 [INFO] [stderr] | [INFO] [stderr] 180 | pub fn as_seconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:185:28 [INFO] [stderr] | [INFO] [stderr] 185 | pub fn as_milliseconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:190:28 [INFO] [stderr] | [INFO] [stderr] 190 | pub fn as_microseconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:195:27 [INFO] [stderr] | [INFO] [stderr] 195 | pub fn as_nanoseconds(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:211:20 [INFO] [stderr] | [INFO] [stderr] 211 | pub fn is_zero(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:216:24 [INFO] [stderr] | [INFO] [stderr] 216 | pub fn is_positive(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:221:24 [INFO] [stderr] | [INFO] [stderr] 221 | pub fn is_negative(&self) -> bool { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:231:19 [INFO] [stderr] | [INFO] [stderr] 231 | pub fn signum(&self) -> f64 { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:264:19 [INFO] [stderr] | [INFO] [stderr] 264 | pub fn to_std(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/duration.rs:285:32 [INFO] [stderr] | [INFO] [stderr] 285 | (duration.subsec_nanos() as f64) / NANOS_PER_SEC) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `f64::from(duration.subsec_nanos())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: this argument is passed by reference, but would be more efficient if passed by value [INFO] [stderr] --> src/duration.rs:296:22 [INFO] [stderr] | [INFO] [stderr] 296 | pub fn to_chrono(&self) -> Result { [INFO] [stderr] | ^^^^^ help: consider passing by value instead: `self` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#trivially_copy_pass_by_ref [INFO] [stderr] [INFO] [stderr] warning: casting f32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/duration.rs:339:35 [INFO] [stderr] | [INFO] [stderr] 339 | Ok(FloatDuration::seconds(value as f64)) [INFO] [stderr] | ^^^^^^^^^^^^ help: try: `f64::from(value)` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 27 [INFO] [stderr] --> src/duration.rs:640:5 [INFO] [stderr] | [INFO] [stderr] 640 | / fn test_construct() { [INFO] [stderr] 641 | | let duration1 = FloatDuration::hours(3.0); [INFO] [stderr] 642 | | assert_eq!(duration1.as_hours(), 3.0); [INFO] [stderr] 643 | | assert_eq!(duration1.as_minutes(), 180.0); [INFO] [stderr] ... | [INFO] [stderr] 678 | | assert_eq!(FloatDuration::years(2.0), FloatDuration::days(365.0 * 2.0)); [INFO] [stderr] 679 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:642:9 [INFO] [stderr] | [INFO] [stderr] 642 | assert_eq!(duration1.as_hours(), 3.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::float_cmp)] on by default [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:642:9 [INFO] [stderr] | [INFO] [stderr] 642 | assert_eq!(duration1.as_hours(), 3.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:643:9 [INFO] [stderr] | [INFO] [stderr] 643 | assert_eq!(duration1.as_minutes(), 180.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:643:9 [INFO] [stderr] | [INFO] [stderr] 643 | assert_eq!(duration1.as_minutes(), 180.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:644:9 [INFO] [stderr] | [INFO] [stderr] 644 | assert_eq!(duration1.as_seconds(), 180.0 * 60.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:644:9 [INFO] [stderr] | [INFO] [stderr] 644 | assert_eq!(duration1.as_seconds(), 180.0 * 60.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:645:9 [INFO] [stderr] | [INFO] [stderr] 645 | assert_eq!(duration1.as_days(), 3.0 / 24.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:645:9 [INFO] [stderr] | [INFO] [stderr] 645 | assert_eq!(duration1.as_days(), 3.0 / 24.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:646:9 [INFO] [stderr] | [INFO] [stderr] 646 | assert_eq!(duration1.as_milliseconds(), 180.0 * 60.0 * 1000.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:646:9 [INFO] [stderr] | [INFO] [stderr] 646 | assert_eq!(duration1.as_milliseconds(), 180.0 * 60.0 * 1000.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:648:9 [INFO] [stderr] | [INFO] [stderr] 648 | assert_eq!(duration1.signum(), 1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:648:9 [INFO] [stderr] | [INFO] [stderr] 648 | assert_eq!(duration1.signum(), 1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:651:9 [INFO] [stderr] | [INFO] [stderr] 651 | assert_eq!(duration2.as_seconds(), 0.055); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:651:9 [INFO] [stderr] | [INFO] [stderr] 651 | assert_eq!(duration2.as_seconds(), 0.055); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:652:9 [INFO] [stderr] | [INFO] [stderr] 652 | assert_eq!(duration2.as_milliseconds(), 55.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:652:9 [INFO] [stderr] | [INFO] [stderr] 652 | assert_eq!(duration2.as_milliseconds(), 55.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:653:9 [INFO] [stderr] | [INFO] [stderr] 653 | assert_eq!(duration2.as_microseconds(), 55000.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:653:9 [INFO] [stderr] | [INFO] [stderr] 653 | assert_eq!(duration2.as_microseconds(), 55000.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:654:9 [INFO] [stderr] | [INFO] [stderr] 654 | assert_eq!(duration2.as_nanoseconds(), 55000000.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:654:9 [INFO] [stderr] | [INFO] [stderr] 654 | assert_eq!(duration2.as_nanoseconds(), 55000000.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:659:9 [INFO] [stderr] | [INFO] [stderr] 659 | assert_eq!(duration3.as_minutes(), 0.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:659:9 [INFO] [stderr] | [INFO] [stderr] 659 | assert_eq!(duration3.as_minutes(), 0.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:660:9 [INFO] [stderr] | [INFO] [stderr] 660 | assert_eq!(duration3.as_nanoseconds(), 0.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:660:9 [INFO] [stderr] | [INFO] [stderr] 660 | assert_eq!(duration3.as_nanoseconds(), 0.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:673:9 [INFO] [stderr] | [INFO] [stderr] 673 | assert_eq!(duration4.as_minutes(), -3.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:673:9 [INFO] [stderr] | [INFO] [stderr] 673 | assert_eq!(duration4.as_minutes(), -3.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:674:9 [INFO] [stderr] | [INFO] [stderr] 674 | assert_eq!(duration4.as_hours(), -0.05); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:674:9 [INFO] [stderr] | [INFO] [stderr] 674 | assert_eq!(duration4.as_hours(), -0.05); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:676:9 [INFO] [stderr] | [INFO] [stderr] 676 | assert_eq!(duration4.signum(), -1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:676:9 [INFO] [stderr] | [INFO] [stderr] 676 | assert_eq!(duration4.signum(), -1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:698:9 [INFO] [stderr] | [INFO] [stderr] 698 | / assert_eq!(FloatDuration::minutes(10.0) / FloatDuration::seconds(60.0), [INFO] [stderr] 699 | | 10.0); [INFO] [stderr] | |_________________________^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:698:9 [INFO] [stderr] | [INFO] [stderr] 698 | / assert_eq!(FloatDuration::minutes(10.0) / FloatDuration::seconds(60.0), [INFO] [stderr] 699 | | 10.0); [INFO] [stderr] | |_________________________^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:742:9 [INFO] [stderr] | [INFO] [stderr] 742 | assert_eq!(duration1.signum(), 1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:742:9 [INFO] [stderr] | [INFO] [stderr] 742 | assert_eq!(duration1.signum(), 1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:748:9 [INFO] [stderr] | [INFO] [stderr] 748 | assert_eq!(duration2.signum(), -1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:748:9 [INFO] [stderr] | [INFO] [stderr] 748 | assert_eq!(duration2.signum(), -1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: strict comparison of f32 or f64 [INFO] [stderr] --> src/duration.rs:757:9 [INFO] [stderr] | [INFO] [stderr] 757 | assert_eq!(FloatDuration::zero().signum(), 1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: std::f32::EPSILON and std::f64::EPSILON are available. [INFO] [stderr] --> src/duration.rs:757:9 [INFO] [stderr] | [INFO] [stderr] 757 | assert_eq!(FloatDuration::zero().signum(), 1.0); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] error: aborting due to 19 previous errors [INFO] [stderr] [INFO] [stderr] error: Could not compile `float_duration`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "bc5bd1dd3c280088499aea9859637cbac3c9ad51cd34b55f749aaa7d3e27d18c"` [INFO] running `"docker" "rm" "-f" "bc5bd1dd3c280088499aea9859637cbac3c9ad51cd34b55f749aaa7d3e27d18c"` [INFO] [stdout] bc5bd1dd3c280088499aea9859637cbac3c9ad51cd34b55f749aaa7d3e27d18c