Skip to content

[0.29.0] Release

[0.29.0] Release #157

GitHub Actions / clippy failed Aug 25, 2024 in 0s

clippy

2 errors

Details

Results

Message level Amount
Internal compiler error 0
Error 2
Warning 0
Note 0
Help 0

Versions

  • rustc 1.82.0-nightly (f167efad2 2024-08-24)
  • cargo 1.82.0-nightly (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (f167efa 2024-08-24)

Annotations

Check failure on line 450 in src/writers/file_log_writer/state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`

error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
   --> src/writers/file_log_writer/state.rs:428:25
    |
428 | /                         match o_current_infix {
429 | |                             Some(current_infix) => {
430 | |                                 *ts = rcurrents_creation_timestamp(
431 | |                                     &self.config,
...   |
449 | |                             }
450 | |                         }
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
note: the lint level is defined here
   --> src/lib.rs:5:9
    |
5   | #![deny(clippy::pedantic)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[deny(clippy::single_match_else)]` implied by `#[deny(clippy::pedantic)]`
help: try
    |
428 ~                         if let Some(current_infix) = o_current_infix {
429 +                             *ts = rcurrents_creation_timestamp(
430 +                                 &self.config,
431 +                                 current_infix,
432 +                                 true,
433 +                                 Some(ts),
434 +                                 fmt,
435 +                             )?;
436 +                             current_infix.clone()
437 +                         } else {
438 +                             *ts = Local::now();
439 +                             collision_free_infix_for_rotated_file(
440 +                                 &self.config.file_spec,
441 +                                 &infix_from_timestamp(
442 +                                     ts,
443 +                                     self.config.use_utc,
444 +                                     &InfixFormat::Std,
445 +                                 ),
446 +                             )
447 +                         }
    |

Check failure on line 450 in src/writers/file_log_writer/state.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`

error: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
   --> src/writers/file_log_writer/state.rs:428:25
    |
428 | /                         match o_current_infix {
429 | |                             Some(current_infix) => {
430 | |                                 *ts = rcurrents_creation_timestamp(
431 | |                                     &self.config,
...   |
449 | |                             }
450 | |                         }
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match_else
note: the lint level is defined here
   --> src/lib.rs:5:9
    |
5   | #![deny(clippy::pedantic)]
    |         ^^^^^^^^^^^^^^^^
    = note: `#[deny(clippy::single_match_else)]` implied by `#[deny(clippy::pedantic)]`
help: try
    |
428 ~                         if let Some(current_infix) = o_current_infix {
429 +                             *ts = rcurrents_creation_timestamp(
430 +                                 &self.config,
431 +                                 current_infix,
432 +                                 true,
433 +                                 Some(ts),
434 +                                 fmt,
435 +                             )?;
436 +                             current_infix.clone()
437 +                         } else {
438 +                             *ts = Local::now();
439 +                             collision_free_infix_for_rotated_file(
440 +                                 &self.config.file_spec,
441 +                                 &infix_from_timestamp(
442 +                                     ts,
443 +                                     self.config.use_utc,
444 +                                     &InfixFormat::Std,
445 +                                 ),
446 +                             )
447 +                         }
    |