Skip to content

Commit

Permalink
Remove new_from_context from the public API (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
MabezDev authored Mar 30, 2024
1 parent 8384906 commit d29e9ba
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion block-device-adapters/src/buf_stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ mod tests {
use aligned::A4;
use embedded_io_async::ErrorType;

use super::{BufStream, *};
use super::*;

struct TestBlockDevice<T: Read + Write + Seek>(T);

Expand Down
1 change: 0 additions & 1 deletion embedded-fatfs/src/dir_entry.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use bitflags::bitflags;
use core::char;
use core::convert::TryInto;
use core::fmt;
#[cfg(not(feature = "unicode"))]
use core::iter;
Expand Down
3 changes: 1 addition & 2 deletions embedded-fatfs/src/file.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use core::cmp;
use core::convert::TryFrom;

use crate::dir_entry::DirEntryEditor;
use crate::error::Error;
Expand Down Expand Up @@ -75,7 +74,7 @@ impl<'a, IO: ReadWriteSeek, TP, OCC> File<'a, IO, TP, OCC> {
///
/// Prefer using [`DirEntry::try_to_file_with_context`](crate::dir_entry::DirEntry::try_to_file_with_context) where possible because
/// it does some basic checks to avoid file corruption.
pub fn new_from_context(context: FileContext, fs: &'a FileSystem<IO, TP, OCC>) -> Self {
pub(crate) fn new_from_context(context: FileContext, fs: &'a FileSystem<IO, TP, OCC>) -> Self {
File { context, fs }
}

Expand Down
1 change: 0 additions & 1 deletion embedded-fatfs/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use core::borrow::BorrowMut;
use core::cell::{Cell, RefCell};
use core::char;
use core::cmp;
use core::convert::TryFrom;
use core::fmt::Debug;
use core::marker::PhantomData;
use core::u32;
Expand Down
5 changes: 1 addition & 4 deletions embedded-fatfs/src/time.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
#![allow(deprecated)]

#[cfg(feature = "chrono")]
use core::convert::TryFrom;
use core::fmt::Debug;

#[cfg(feature = "chrono")]
use chrono::{self, Datelike, Local, TimeZone, Timelike};
use chrono::{Datelike, Local, TimeZone, Timelike};

const MIN_YEAR: u16 = 1980;
const MAX_YEAR: u16 = 2107;
Expand Down

0 comments on commit d29e9ba

Please sign in to comment.