Skip to content

Commit c33c4e1

Browse files
committed
Ignore more clippy lints at workspace level
1 parent 7d4bb5e commit c33c4e1

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ undocumented_unsafe_blocks = "warn"
8181
# Suppress buggy or noisy clippy lints
8282
bool_assert_comparison = { level = "allow", priority = 1 }
8383
borrow_as_ptr = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/8286
84+
cast_lossless = { level = "allow", priority = 1 } # https://godbolt.org/z/Pv6vbGG6E
8485
declare_interior_mutable_const = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7665
8586
doc_markdown = { level = "allow", priority = 1 }
8687
float_cmp = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/7725
@@ -90,6 +91,7 @@ manual_assert = { level = "allow", priority = 1 }
9091
manual_range_contains = { level = "allow", priority = 1 } # https://github.com/rust-lang/rust-clippy/issues/6455#issuecomment-1225966395
9192
missing_errors_doc = { level = "allow", priority = 1 }
9293
module_name_repetitions = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+module_name_repetitions
94+
naive_bytecount = { level = "allow", priority = 1 }
9395
nonminimal_bool = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+nonminimal_bool
9496
range_plus_one = { level = "allow", priority = 1 } # buggy: https://github.com/rust-lang/rust-clippy/issues?q=is%3Aissue+is%3Aopen+range_plus_one
9597
similar_names = { level = "allow", priority = 1 }
@@ -100,6 +102,7 @@ struct_field_names = { level = "allow", priority = 1 }
100102
too_many_arguments = { level = "allow", priority = 1 }
101103
too_many_lines = { level = "allow", priority = 1 }
102104
type_complexity = { level = "allow", priority = 1 }
105+
unreadable_literal = { level = "allow", priority = 1 }
103106

104107
[profile.release]
105108
codegen-units = 1

src/cargo.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ pub(crate) fn clean_args(cx: &Context, cmd: &mut ProcessBuilder) {
249249

250250
// If `-vv` is passed, propagate `-v` to cargo.
251251
if cx.args.verbose > 1 {
252-
cmd.arg(format!("-{}", "v".repeat(usize::from(cx.args.verbose) - 1)));
252+
cmd.arg(format!("-{}", "v".repeat(cx.args.verbose as usize - 1)));
253253
}
254254
}
255255

src/clean.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ fn clean_ws(
9393
cmd.args(["clean", "--target-dir", ws.target_dir.as_str()]).args(&package_args);
9494
cmd.args(args);
9595
if verbose > 0 {
96-
cmd.arg(format!("-{}", "v".repeat(usize::from(verbose))));
96+
cmd.arg(format!("-{}", "v".repeat(verbose as usize)));
9797
}
9898
manifest.cargo_args(&mut cmd);
9999
cmd.dir(&ws.metadata.workspace_root);

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ pub(crate) fn merge_config_to_args(
410410
target.clone_from(&ws.target_for_cli);
411411
}
412412
if *verbose == 0 {
413-
*verbose = u8::from(ws.config.term.verbose.unwrap_or(false));
413+
*verbose = ws.config.term.verbose.unwrap_or(false) as u8;
414414
}
415415
if color.is_none() {
416416
*color = ws.config.term.color.map(Into::into);

src/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl CodeCovJsonExport {
106106
for line in loc.lines() {
107107
let coverage = coverage.0.entry(line).or_default();
108108
coverage.count += 1;
109-
coverage.covered += u64::from(covered);
109+
coverage.covered += covered as u64;
110110
}
111111
}
112112
}

0 commit comments

Comments
 (0)