Skip to content

Commit a78576a

Browse files
authored
Allow clippy::single_range_in_vec_init as a permanent rule (#9366)
This PR promotes the allowance of the [`clippy::single_range_in_vec_init`](https://rust-lang.github.io/rust-clippy/master/index.html#/single_range_in_vec_init) rule to a permanent one. This rule complains about a pretty common pattern we use that doesn't seem to have any adverse effects, so we're going to continue allowing this rule. Release Notes: - N/A
1 parent 7f3f296 commit a78576a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,10 @@ codegen-units = 1
388388
dbg_macro = "deny"
389389
todo = "deny"
390390

391+
# Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
392+
# warning on this rule produces a lot of noise.
393+
single_range_in_vec_init = "allow"
394+
391395
# These are all of the rules that currently have violations in the Zed
392396
# codebase.
393397
#
@@ -414,7 +418,6 @@ map_entry = "allow"
414418
non_canonical_clone_impl = "allow"
415419
non_canonical_partial_ord_impl = "allow"
416420
reversed_empty_ranges = "allow"
417-
single_range_in_vec_init = "allow"
418421
type_complexity = "allow"
419422

420423
[workspace.metadata.cargo-machete]

0 commit comments

Comments
 (0)