Skip to content

Commit

Permalink
Fix Clippy warnings (legacy_numeric_constants) + some unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalh committed Oct 25, 2024
1 parent a276bb9 commit 07ef957
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions src/boot_sector.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
use core::slice;
use core::u16;
use core::u8;

use crate::dir_entry::DIR_ENTRY_SIZE;
use crate::error::{Error, IoError};
Expand Down Expand Up @@ -820,7 +818,6 @@ pub(crate) fn format_boot_sector<E: IoError>(
#[cfg(test)]
mod tests {
use super::*;
use core::u32;

fn init() {
let _ = env_logger::builder().is_test(true).try_init();
Expand Down
1 change: 0 additions & 1 deletion src/dir.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#[cfg(all(not(feature = "std"), feature = "alloc", feature = "lfn"))]
use alloc::vec::Vec;
use core::char;
use core::num;
use core::str;
#[cfg(feature = "lfn")]
Expand Down
1 change: 0 additions & 1 deletion src/dir_entry.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ use core::convert::TryInto;
use core::fmt;
#[cfg(not(feature = "unicode"))]
use core::iter;
use core::str;

#[cfg(feature = "lfn")]
use crate::dir::LfnBuffer;
Expand Down
2 changes: 1 addition & 1 deletion src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::fs::{FileSystem, ReadWriteSeek};
use crate::io::{IoBase, Read, Seek, SeekFrom, Write};
use crate::time::{Date, DateTime, TimeProvider};

const MAX_FILE_SIZE: u32 = core::u32::MAX;
const MAX_FILE_SIZE: u32 = u32::MAX;

/// A FAT filesystem file object used for reading and writing data.
///
Expand Down
2 changes: 0 additions & 2 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
use alloc::string::String;
use core::borrow::BorrowMut;
use core::cell::{Cell, RefCell};
use core::char;
use core::convert::TryFrom;
use core::fmt::Debug;
use core::marker::PhantomData;
use core::u32;

use crate::boot_sector::{format_boot_sector, BiosParameterBlock, BootSector};
use crate::dir::{Dir, DirRawStream};
Expand Down

0 comments on commit 07ef957

Please sign in to comment.