Skip to content

Commit

Permalink
chore: Additional clippy lints and formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
VorpalBlade committed Sep 6, 2024
1 parent 0addd24 commit 24d49b4
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,17 @@ rust-2018-idioms = "warn"
unreachable_pub = "warn"

[lints.clippy]
assigning_clones = "warn"
doc_markdown = "warn"
format_push_string = "warn"
needless_pass_by_value = "warn"
ptr_as_ptr = "warn"
redundant_clone = "warn"
redundant_closure_for_method_calls = "warn"
semicolon_if_nothing_returned = "warn"
undocumented_unsafe_blocks = "warn"
uninlined_format_args = "warn"
unnecessary_box_returns = "warn"
unnecessary_safety_doc = "warn"
unwrap_used = "warn"
wildcard_imports = "warn"
7 changes: 3 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@
//!
//! The actual output is uses ANSI colour codes as well.
use std::cmp::max;
use std::io::Write;

use anstyle::AnsiColor;
use anstyle::Effects;
use anstyle::Reset;
use std::cmp::max;
use std::io::Write;
use strum::IntoStaticStr;
use thiserror::Error;

Expand Down Expand Up @@ -71,7 +70,7 @@ pub fn medic<'iter>(
}
}
Err(err) => {
results.push((CheckResult::Fatal, *name, format!("{}", err)));
results.push((CheckResult::Fatal, *name, format!("{err}")));
worst_issues_found = CheckResult::Fatal;
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use pretty_assertions::assert_eq;

use crate::medic;
use crate::Check;
use crate::CheckResult;
use pretty_assertions::assert_eq;

#[test]
fn test_medic() {
Expand Down

0 comments on commit 24d49b4

Please sign in to comment.