Skip to content

Version Bump 0.5.8 #422

Version Bump 0.5.8

Version Bump 0.5.8 #422

GitHub Actions / clippy succeeded Jan 14, 2025 in 0s

clippy

1 warning

Details

Results

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

Versions

  • rustc 1.84.0 (9fc6b4312 2025-01-07)
  • cargo 1.84.0 (66221abde 2024-11-19)
  • clippy 0.1.84 (9fc6b43126 2025-01-07)

Annotations

Check warning on line 180 in main/src/project.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `map_or` is redundant

warning: this `map_or` is redundant
   --> main/src/project.rs:166:23
    |
166 |               } else if path.file_name().map_or(false, |f| {
    |  _______________________^
167 | |                 // If the user has has specified a list of source file patterns, check if the file
168 | |                 // matches the pattern.
169 | |                 if !glob_paths.is_empty() {
...   |
179 | |                 }
180 | |             }) {
    | |______________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `#[warn(clippy::unnecessary_map_or)]` on by default
help: use is_some_and instead
    |
166 ~             } else if path.file_name().is_some_and(|f| {
167 +                 // If the user has has specified a list of source file patterns, check if the file
168 +                 // matches the pattern.
169 +                 if !glob_paths.is_empty() {
170 +                     for glob_path in glob_paths.iter() {
171 +                         if glob_path == &path {
172 +                             return true;
173 +                         }
174 +                     }
175 +                     false
176 +                 } else {
177 +                     // Otherwise, by default include all rust files, Cargo.toml and Cargo.lock files.
178 +                     f == "Cargo.toml" || f == "Cargo.lock" || f.to_string_lossy().ends_with(".rs")
179 +                 }
180 ~             }) {
    |