Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
evanrittenhouse committed Jul 13, 2023
1 parent f642570 commit f180504
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/ruff_cli/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub(crate) fn lint_path(
(result, fixed)
}
}
_ => {
flags::FixMode::Generate(_) => {
let result = lint_only(&contents, path, package, &settings.lib, noqa);
let fixed = FxHashMap::default();
(result, fixed)
Expand Down Expand Up @@ -333,7 +333,7 @@ pub(crate) fn lint_stdin(
(result, fixed)
}
}
_ => {
flags::FixMode::Generate(_) => {
let result = lint_only(
contents,
path.unwrap_or_else(|| Path::new("-")),
Expand Down
4 changes: 2 additions & 2 deletions crates/ruff_cli/src/printer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ fn print_fix_summary(writer: &mut dyn Write, fixed: &FxHashMap<String, FixTable>
}

/// Build the displayed fix status message depending on the types of the remaining fixes.
fn display_violations<'a>(safe_remaining: i32, unsafe_remaining: i32) -> String {
fn display_violations(safe_remaining: i32, unsafe_remaining: i32) -> String {
let prefix = format!("[{}]", "*".cyan());
let mut fix_status = prefix;

Expand All @@ -506,5 +506,5 @@ fn display_violations<'a>(safe_remaining: i32, unsafe_remaining: i32) -> String
);
}

fix_status.to_owned()
fix_status
}

0 comments on commit f180504

Please sign in to comment.