[INFO] crate koyomi 0.1.0 is already in cache [INFO] extracting crate koyomi 0.1.0 into work/ex/clippy-test-run/sources/stable/reg/koyomi/0.1.0 [INFO] extracting crate koyomi 0.1.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/koyomi/0.1.0 [INFO] validating manifest of koyomi-0.1.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of koyomi-0.1.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing koyomi-0.1.0 [INFO] finished frobbing koyomi-0.1.0 [INFO] frobbed toml for koyomi-0.1.0 written to work/ex/clippy-test-run/sources/stable/reg/koyomi/0.1.0/Cargo.toml [INFO] started frobbing koyomi-0.1.0 [INFO] finished frobbing koyomi-0.1.0 [INFO] frobbed toml for koyomi-0.1.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/koyomi/0.1.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting koyomi-0.1.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/koyomi/0.1.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] d0aea6b12695be206cf1282b50fc78ff958394777f3dc3b2043a78659eb16a0f [INFO] running `"docker" "start" "-a" "d0aea6b12695be206cf1282b50fc78ff958394777f3dc3b2043a78659eb16a0f"` [INFO] [stderr] Checking koyomi v0.1.0 (/opt/crater/workdir) [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/calendar.rs:46:50 [INFO] [stderr] | [INFO] [stderr] 46 | } else if year % 100 == 0 && year % 400 != 0 { [INFO] [stderr] | __________________________________________________^ [INFO] [stderr] 47 | | false [INFO] [stderr] 48 | | } else { [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/calendar.rs:44:22 [INFO] [stderr] | [INFO] [stderr] 44 | if year % 4 != 0 { [INFO] [stderr] | ______________________^ [INFO] [stderr] 45 | | false [INFO] [stderr] 46 | | } else if year % 100 == 0 && year % 400 != 0 { [INFO] [stderr] | |_____^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/calendar.rs:46:12 [INFO] [stderr] | [INFO] [stderr] 46 | } else if year % 100 == 0 && year % 400 != 0 { [INFO] [stderr] | ____________^ [INFO] [stderr] 47 | | false [INFO] [stderr] 48 | | } else { [INFO] [stderr] 49 | | true [INFO] [stderr] 50 | | } [INFO] [stderr] | |_____^ help: you can reduce it to: `!(year % 100 == 0 && year % 400 != 0)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/calendar.rs:242:38 [INFO] [stderr] | [INFO] [stderr] 242 | Some(f) => match f.split("-").count() { [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/calendar.rs:254:38 [INFO] [stderr] | [INFO] [stderr] 254 | Some(u) => match u.split("-").count() { [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/calendar.rs:271:31 [INFO] [stderr] | [INFO] [stderr] 271 | let splits = ym.split("-").collect::>(); [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/date.rs:113:18 [INFO] [stderr] | [INFO] [stderr] 113 | .map(|d| Date::from_chrono(d)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Date::from_chrono` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/date.rs:111:14 [INFO] [stderr] | [INFO] [stderr] 111 | .or(NaiveDate::parse_from_str(fmt, "%Y/%m/%d")) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|_| NaiveDate::parse_from_str(fmt, "%Y/%m/%d"))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/date.rs:245:18 [INFO] [stderr] | [INFO] [stderr] 245 | .map(|d| Date::from_chrono(d)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Date::from_chrono` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/date.rs:244:14 [INFO] [stderr] | [INFO] [stderr] 244 | .ok_or(KoyomiError::NoTomorrow(self.year, self.month, self.day)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| KoyomiError::NoTomorrow(self.year, self.month, self.day))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/date.rs:291:18 [INFO] [stderr] | [INFO] [stderr] 291 | .map(|d| Date::from_chrono(d)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Date::from_chrono` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/date.rs:290:14 [INFO] [stderr] | [INFO] [stderr] 290 | .ok_or(KoyomiError::NoYesterday(self.year, self.month, self.day)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| KoyomiError::NoYesterday(self.year, self.month, self.day))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/era.rs:8:12 [INFO] [stderr] | [INFO] [stderr] 8 | const ERA: [(&str, i32, u32, u32, Option<(i32, u32, u32)>); 4] = [ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/era.rs:120:32 [INFO] [stderr] | [INFO] [stderr] 120 | Some(ref until) => &self.from <= date && date <= until, [INFO] [stderr] | ----------^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `self.from` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/era.rs:121:21 [INFO] [stderr] | [INFO] [stderr] 121 | None => &self.from <= date, [INFO] [stderr] | ----------^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `self.from` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:42:10 [INFO] [stderr] | [INFO] [stderr] 42 | .or(national_holiday(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| national_holiday(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:40:10 [INFO] [stderr] | [INFO] [stderr] 40 | .or(autumnal_equinox_day(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| autumnal_equinox_day(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:38:10 [INFO] [stderr] | [INFO] [stderr] 38 | .or(vernal_equinox_day(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| vernal_equinox_day(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:36:10 [INFO] [stderr] | [INFO] [stderr] 36 | .or(variable_holiday(12, date, is_second_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(12, date, is_second_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:34:10 [INFO] [stderr] | [INFO] [stderr] 34 | .or(variable_holiday(11, date, is_third_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(11, date, is_third_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:32:10 [INFO] [stderr] | [INFO] [stderr] 32 | .or(variable_holiday(9, date, is_third_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(9, date, is_third_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:30:10 [INFO] [stderr] | [INFO] [stderr] 30 | .or(variable_holiday(1, date, is_second_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(1, date, is_second_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:28:10 [INFO] [stderr] | [INFO] [stderr] 28 | .or(substitute_holiday(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| substitute_holiday(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:182:47 [INFO] [stderr] | [INFO] [stderr] 182 | let between = defined_holiday(&yesterday).or(variable_holiday(11, &yesterday, is_third_week)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(11, &yesterday, is_third_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/holiday.rs:183:5 [INFO] [stderr] | [INFO] [stderr] 183 | / if between.is_none() { [INFO] [stderr] 184 | | return None; [INFO] [stderr] 185 | | } [INFO] [stderr] | |_____^ help: replace_it_with: `between?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::question_mark)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:189:46 [INFO] [stderr] | [INFO] [stderr] 189 | let between = defined_holiday(&tomorrow).or(autumnal_equinox_day(&tomorrow)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| autumnal_equinox_day(&tomorrow))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/holiday.rs:190:5 [INFO] [stderr] | [INFO] [stderr] 190 | / if between.is_none() { [INFO] [stderr] 191 | | return None; [INFO] [stderr] 192 | | } [INFO] [stderr] | |_____^ help: replace_it_with: `between?;` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:207:18 [INFO] [stderr] | [INFO] [stderr] 207 | .or(autumnal_equinox_day(&y)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| autumnal_equinox_day(&y))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:206:18 [INFO] [stderr] | [INFO] [stderr] 206 | .or(vernal_equinox_day(&y)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| vernal_equinox_day(&y))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `koyomi`. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: this `if` has identical blocks [INFO] [stderr] --> src/calendar.rs:46:50 [INFO] [stderr] | [INFO] [stderr] 46 | } else if year % 100 == 0 && year % 400 != 0 { [INFO] [stderr] | __________________________________________________^ [INFO] [stderr] 47 | | false [INFO] [stderr] 48 | | } else { [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[deny(clippy::if_same_then_else)] on by default [INFO] [stderr] note: same as this [INFO] [stderr] --> src/calendar.rs:44:22 [INFO] [stderr] | [INFO] [stderr] 44 | if year % 4 != 0 { [INFO] [stderr] | ______________________^ [INFO] [stderr] 45 | | false [INFO] [stderr] 46 | | } else if year % 100 == 0 && year % 400 != 0 { [INFO] [stderr] | |_____^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stderr] [INFO] [stderr] warning: this if-then-else expression returns a bool literal [INFO] [stderr] --> src/calendar.rs:46:12 [INFO] [stderr] | [INFO] [stderr] 46 | } else if year % 100 == 0 && year % 400 != 0 { [INFO] [stderr] | ____________^ [INFO] [stderr] 47 | | false [INFO] [stderr] 48 | | } else { [INFO] [stderr] 49 | | true [INFO] [stderr] 50 | | } [INFO] [stderr] | |_____^ help: you can reduce it to: `!(year % 100 == 0 && year % 400 != 0)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_bool [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/calendar.rs:242:38 [INFO] [stderr] | [INFO] [stderr] 242 | Some(f) => match f.split("-").count() { [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/calendar.rs:254:38 [INFO] [stderr] | [INFO] [stderr] 254 | Some(u) => match u.split("-").count() { [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/calendar.rs:271:31 [INFO] [stderr] | [INFO] [stderr] 271 | let splits = ym.split("-").collect::>(); [INFO] [stderr] | ^^^ help: try using a char instead: `'-'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/date.rs:113:18 [INFO] [stderr] | [INFO] [stderr] 113 | .map(|d| Date::from_chrono(d)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Date::from_chrono` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/date.rs:111:14 [INFO] [stderr] | [INFO] [stderr] 111 | .or(NaiveDate::parse_from_str(fmt, "%Y/%m/%d")) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|_| NaiveDate::parse_from_str(fmt, "%Y/%m/%d"))` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/date.rs:245:18 [INFO] [stderr] | [INFO] [stderr] 245 | .map(|d| Date::from_chrono(d)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Date::from_chrono` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/date.rs:244:14 [INFO] [stderr] | [INFO] [stderr] 244 | .ok_or(KoyomiError::NoTomorrow(self.year, self.month, self.day)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| KoyomiError::NoTomorrow(self.year, self.month, self.day))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/date.rs:291:18 [INFO] [stderr] | [INFO] [stderr] 291 | .map(|d| Date::from_chrono(d)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `Date::from_chrono` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: use of `ok_or` followed by a function call [INFO] [stderr] --> src/date.rs:290:14 [INFO] [stderr] | [INFO] [stderr] 290 | .ok_or(KoyomiError::NoYesterday(self.year, self.month, self.day)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `ok_or_else(|| KoyomiError::NoYesterday(self.year, self.month, self.day))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: very complex type used. Consider factoring parts into `type` definitions [INFO] [stderr] --> src/era.rs:8:12 [INFO] [stderr] | [INFO] [stderr] 8 | const ERA: [(&str, i32, u32, u32, Option<(i32, u32, u32)>); 4] = [ [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::type_complexity)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/era.rs:120:32 [INFO] [stderr] | [INFO] [stderr] 120 | Some(ref until) => &self.from <= date && date <= until, [INFO] [stderr] | ----------^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `self.from` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::op_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: needlessly taken reference of left operand [INFO] [stderr] --> src/era.rs:121:21 [INFO] [stderr] | [INFO] [stderr] 121 | None => &self.from <= date, [INFO] [stderr] | ----------^^^^^^^^ [INFO] [stderr] | | [INFO] [stderr] | help: use the left value directly: `self.from` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:42:10 [INFO] [stderr] | [INFO] [stderr] 42 | .or(national_holiday(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| national_holiday(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:40:10 [INFO] [stderr] | [INFO] [stderr] 40 | .or(autumnal_equinox_day(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| autumnal_equinox_day(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:38:10 [INFO] [stderr] | [INFO] [stderr] 38 | .or(vernal_equinox_day(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| vernal_equinox_day(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:36:10 [INFO] [stderr] | [INFO] [stderr] 36 | .or(variable_holiday(12, date, is_second_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(12, date, is_second_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:34:10 [INFO] [stderr] | [INFO] [stderr] 34 | .or(variable_holiday(11, date, is_third_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(11, date, is_third_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:32:10 [INFO] [stderr] | [INFO] [stderr] 32 | .or(variable_holiday(9, date, is_third_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(9, date, is_third_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:30:10 [INFO] [stderr] | [INFO] [stderr] 30 | .or(variable_holiday(1, date, is_second_week)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(1, date, is_second_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:28:10 [INFO] [stderr] | [INFO] [stderr] 28 | .or(substitute_holiday(date)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| substitute_holiday(date))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:182:47 [INFO] [stderr] | [INFO] [stderr] 182 | let between = defined_holiday(&yesterday).or(variable_holiday(11, &yesterday, is_third_week)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| variable_holiday(11, &yesterday, is_third_week))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/holiday.rs:183:5 [INFO] [stderr] | [INFO] [stderr] 183 | / if between.is_none() { [INFO] [stderr] 184 | | return None; [INFO] [stderr] 185 | | } [INFO] [stderr] | |_____^ help: replace_it_with: `between?;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::question_mark)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:189:46 [INFO] [stderr] | [INFO] [stderr] 189 | let between = defined_holiday(&tomorrow).or(autumnal_equinox_day(&tomorrow)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| autumnal_equinox_day(&tomorrow))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: this block may be rewritten with the `?` operator [INFO] [stderr] --> src/holiday.rs:190:5 [INFO] [stderr] | [INFO] [stderr] 190 | / if between.is_none() { [INFO] [stderr] 191 | | return None; [INFO] [stderr] 192 | | } [INFO] [stderr] | |_____^ help: replace_it_with: `between?;` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:207:18 [INFO] [stderr] | [INFO] [stderr] 207 | .or(autumnal_equinox_day(&y)); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| autumnal_equinox_day(&y))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `or` followed by a function call [INFO] [stderr] --> src/holiday.rs:206:18 [INFO] [stderr] | [INFO] [stderr] 206 | .or(vernal_equinox_day(&y)) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| vernal_equinox_day(&y))` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] error: aborting due to previous error [INFO] [stderr] [INFO] [stderr] error: Could not compile `koyomi`. [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] running `"docker" "inspect" "d0aea6b12695be206cf1282b50fc78ff958394777f3dc3b2043a78659eb16a0f"` [INFO] running `"docker" "rm" "-f" "d0aea6b12695be206cf1282b50fc78ff958394777f3dc3b2043a78659eb16a0f"` [INFO] [stdout] d0aea6b12695be206cf1282b50fc78ff958394777f3dc3b2043a78659eb16a0f