File tree Expand file tree Collapse file tree 12 files changed +2
-51
lines changed Expand file tree Collapse file tree 12 files changed +2
-51
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,6 @@ Add this to your `Cargo.toml`:
2828 [dependencies]
2929 fatfs = "0.4"
3030
31- and this to your crate root:
32-
33- extern crate fatfs;
34-
3531You can start using the ` fatfs ` library now:
3632
3733 let img_file = File::open("fat.img")?;
@@ -43,7 +39,6 @@ You can start using the `fatfs` library now:
4339Note: it is recommended to wrap the underlying file struct in a buffering/caching object like ` BufStream ` from
4440` fscommon ` crate. For example:
4541
46- extern crate fscommon;
4742 let buf_stream = BufStream::new(img_file);
4843 let fs = fatfs::FileSystem::new(buf_stream, fatfs::FsOptions::new())?;
4944
Original file line number Diff line number Diff line change 1- extern crate fatfs;
2- extern crate fscommon;
3-
41use std:: env;
52use std:: fs:: File ;
63use std:: io:: { self , prelude:: * } ;
Original file line number Diff line number Diff line change 1- extern crate chrono;
2- extern crate fatfs;
3- extern crate fscommon;
4-
51use std:: env;
62use std:: fs:: File ;
73use std:: io;
Original file line number Diff line number Diff line change 1- extern crate fatfs;
2- extern crate fscommon;
3-
41use std:: env;
52use std:: fs;
63use std:: io;
Original file line number Diff line number Diff line change 1- extern crate fatfs;
2- extern crate fscommon;
3-
41use std:: { fs, io} ;
52
63use fatfs:: { FileSystem , FsOptions } ;
Original file line number Diff line number Diff line change 1- extern crate fatfs;
2- extern crate fscommon;
3-
41use std:: fs:: OpenOptions ;
52use std:: io:: { self , prelude:: * } ;
63
Original file line number Diff line number Diff line change @@ -801,8 +801,7 @@ pub(crate) fn format_boot_sector<E: IoError>(
801801#[ cfg( test) ]
802802mod tests {
803803 use super :: * ;
804- extern crate env_logger;
805- use crate :: core:: u32;
804+ use core:: u32;
806805
807806 fn init ( ) {
808807 let _ = env_logger:: builder ( ) . is_test ( true ) . try_init ( ) ;
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ use core::fmt;
66#[ cfg( not( feature = "unicode" ) ) ]
77use core:: iter;
88use core:: str;
9+ use bitflags:: bitflags;
910
1011#[ cfg( feature = "lfn" ) ]
1112use crate :: dir:: LfnBuffer ;
Original file line number Diff line number Diff line change 1010//! fatfs = "0.4"
1111//! ```
1212//!
13- //! And this in your crate root:
14- //!
15- //! ```rust
16- //! extern crate fatfs;
17- //! ```
18- //!
1913//! # Examples
2014//!
2115//! ```rust
22- //! // Declare external crates
23- //! // Note: `fscommon` crate is used to speedup IO operations
24- //! extern crate fatfs;
25- //! extern crate fscommon;
26- //!
2716//! use std::io::prelude::*;
2817//!
2918//! fn main() -> std::io::Result<()> {
6049#![ warn( clippy:: pedantic) ]
6150#![ allow( clippy:: module_name_repetitions, clippy:: cast_possible_truncation) ]
6251
63- #[ macro_use]
64- extern crate bitflags;
65-
6652#[ macro_use]
6753extern crate log;
6854
69- extern crate core;
70-
7155#[ cfg( all( not( feature = "std" ) , feature = "alloc" ) ) ]
7256extern crate alloc;
7357
Original file line number Diff line number Diff line change 1- extern crate env_logger;
2- extern crate fatfs;
3- extern crate fscommon;
4-
51use std:: io;
62use std:: io:: prelude:: * ;
73
You can’t perform that action at this time.
0 commit comments