Skip to content

Commit ee42909

Browse files
committed
Remove some unnecessary allow declarations
1 parent 5e9ac38 commit ee42909

File tree

4 files changed

+5
-30
lines changed

4 files changed

+5
-30
lines changed

src/fs.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,12 @@ impl FsStatusFlags {
8888
/// Checks if the volume is marked as dirty.
8989
///
9090
/// Dirty flag means volume has been suddenly ejected from filesystem without unmounting.
91-
#[allow(clippy::trivially_copy_pass_by_ref)]
9291
#[must_use]
9392
pub fn dirty(&self) -> bool {
9493
self.dirty
9594
}
9695

9796
/// Checks if the volume has the IO Error flag active.
98-
#[allow(clippy::trivially_copy_pass_by_ref)]
9997
#[must_use]
10098
pub fn io_error(&self) -> bool {
10199
self.io_error
@@ -256,7 +254,6 @@ impl FsOptions<DefaultTimeProvider, LossyOemCpConverter> {
256254
}
257255
}
258256

259-
#[allow(clippy::use_self)]
260257
impl<TP: TimeProvider, OCC: OemCpConverter> FsOptions<TP, OCC> {
261258
/// If enabled accessed date field in directory entry is updated when reading or writing a file.
262259
pub fn update_accessed_date(mut self, enabled: bool) -> Self {

src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,7 @@
5858
// Disable warnings to not clutter code with cfg too much
5959
#![cfg_attr(not(all(feature = "alloc", feature = "lfn")), allow(dead_code, unused_imports))]
6060
#![warn(clippy::pedantic)]
61-
#![allow(
62-
clippy::module_name_repetitions,
63-
clippy::cast_possible_truncation,
64-
)]
61+
#![allow(clippy::module_name_repetitions, clippy::cast_possible_truncation)]
6562

6663
#[macro_use]
6764
extern crate bitflags;

src/table.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,6 @@ mod tests {
665665
use io::StdIoWrapper;
666666
use std::io::Cursor;
667667

668-
#[allow(clippy::cognitive_complexity)]
669668
fn test_fat<S: Read + Write + Seek>(fat_type: FatType, mut cur: S) {
670669
// based on cluster maps from Wikipedia:
671670
// https://en.wikipedia.org/wiki/Design_of_the_FAT_file_system#Cluster_map

src/time.rs

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -41,20 +41,12 @@ impl Date {
4141
assert!((MIN_YEAR..=MAX_YEAR).contains(&year), "year out of range");
4242
assert!((MIN_MONTH..=MAX_MONTH).contains(&month), "month out of range");
4343
assert!((MIN_DAY..=MAX_DAY).contains(&day), "day out of range");
44-
Self {
45-
year,
46-
month,
47-
day,
48-
}
44+
Self { year, month, day }
4945
}
5046

5147
pub(crate) fn decode(dos_date: u16) -> Self {
5248
let (year, month, day) = ((dos_date >> 9) + MIN_YEAR, (dos_date >> 5) & 0xF, dos_date & 0x1F);
53-
Self {
54-
year,
55-
month,
56-
day,
57-
}
49+
Self { year, month, day }
5850
}
5951

6052
pub(crate) fn encode(self) -> u16 {
@@ -95,25 +87,15 @@ impl Time {
9587
assert!(min <= 59, "min out of range");
9688
assert!(sec <= 59, "sec out of range");
9789
assert!(millis <= 999, "millis out of range");
98-
Self {
99-
hour,
100-
min,
101-
sec,
102-
millis,
103-
}
90+
Self { hour, min, sec, millis }
10491
}
10592

10693
pub(crate) fn decode(dos_time: u16, dos_time_hi_res: u8) -> Self {
10794
let hour = dos_time >> 11;
10895
let min = (dos_time >> 5) & 0x3F;
10996
let sec = (dos_time & 0x1F) * 2 + u16::from(dos_time_hi_res / 100);
11097
let millis = u16::from(dos_time_hi_res % 100) * 10;
111-
Self {
112-
hour,
113-
min,
114-
sec,
115-
millis,
116-
}
98+
Self { hour, min, sec, millis }
11799
}
118100

119101
pub(crate) fn encode(self) -> (u16, u8) {

0 commit comments

Comments
 (0)