diff --git a/examples/ls.rs b/examples/ls.rs index 6fe38bb..0b9a5d3 100644 --- a/examples/ls.rs +++ b/examples/ls.rs @@ -4,7 +4,6 @@ extern crate chrono; use std::env; use std::fs::File; use std::io::BufReader; -use std::str; use chrono::{DateTime, Local}; use fatfs::FileSystem; diff --git a/src/fs.rs b/src/fs.rs index dcb35b3..5e68068 100644 --- a/src/fs.rs +++ b/src/fs.rs @@ -87,8 +87,8 @@ pub struct FileSystem<'a> { impl <'a> FileSystem<'a> { - pub fn new(mut rdr: &'a mut T) -> io::Result> { - let boot = Self::read_boot_record(&mut *rdr)?; + pub fn new(rdr: &'a mut T) -> io::Result> { + let boot = Self::read_boot_record(rdr)?; if boot.boot_sig != [0x55, 0xAA] { return Err(Error::new(ErrorKind::Other, "invalid signature")); }