Skip to content

Commit 70b93aa

Browse files
committed
Auto merge of rust-lang#5376 - flip1995:verbose_file_reads_restriction, r=matthiaskrgr
Move verbose_file_reads to restriction cc rust-lang#5368 Using `File::read` instead of `fs::read_to_end` does make sense in multiple cases, so this lint is rather restriction, than complexity changelog: Move [`verbose_file_reads`] to restriction
2 parents 64befe5 + 7a40b5c commit 70b93aa

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

clippy_lints/src/lib.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,7 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
10641064
LintId::of(&shadow::SHADOW_REUSE),
10651065
LintId::of(&shadow::SHADOW_SAME),
10661066
LintId::of(&strings::STRING_ADD),
1067+
LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
10671068
LintId::of(&write::PRINT_STDOUT),
10681069
LintId::of(&write::USE_DEBUG),
10691070
]);
@@ -1382,7 +1383,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
13821383
LintId::of(&unwrap::PANICKING_UNWRAP),
13831384
LintId::of(&unwrap::UNNECESSARY_UNWRAP),
13841385
LintId::of(&vec::USELESS_VEC),
1385-
LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
13861386
LintId::of(&write::PRINTLN_EMPTY_STRING),
13871387
LintId::of(&write::PRINT_LITERAL),
13881388
LintId::of(&write::PRINT_WITH_NEWLINE),
@@ -1565,7 +1565,6 @@ pub fn register_plugins(store: &mut rustc_lint::LintStore, sess: &Session, conf:
15651565
LintId::of(&types::UNNECESSARY_CAST),
15661566
LintId::of(&types::VEC_BOX),
15671567
LintId::of(&unwrap::UNNECESSARY_UNWRAP),
1568-
LintId::of(&verbose_file_reads::VERBOSE_FILE_READS),
15691568
LintId::of(&zero_div_zero::ZERO_DIVIDED_BY_ZERO),
15701569
]);
15711570

clippy_lints/src/verbose_file_reads.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ declare_clippy_lint! {
2626
/// let mut bytes = fs::read("foo.txt").unwrap();
2727
/// ```
2828
pub VERBOSE_FILE_READS,
29-
complexity,
29+
restriction,
3030
"use of `File::read_to_end` or `File::read_to_string`"
3131
}
3232

src/lintlist/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2410,7 +2410,7 @@ pub const ALL_LINTS: [Lint; 362] = [
24102410
},
24112411
Lint {
24122412
name: "verbose_file_reads",
2413-
group: "complexity",
2413+
group: "restriction",
24142414
desc: "use of `File::read_to_end` or `File::read_to_string`",
24152415
deprecation: None,
24162416
module: "verbose_file_reads",

0 commit comments

Comments
 (0)