Skip to content

Commit

Permalink
fixup! Add object-safe traits for File, Filesystem, Storage
Browse files Browse the repository at this point in the history
Rename read_file and read_file_chunk for consistency
  • Loading branch information
robin-nitrokey committed Dec 15, 2023
1 parent 909d9f4 commit 937efcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/object_safe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ impl<S: Storage> DynFilesystem for Filesystem<'_, S> {
}

impl dyn DynFilesystem + '_ {
pub fn read_file<const N: usize>(&self, path: &Path) -> Result<Vec<u8, N>> {
pub fn read<const N: usize>(&self, path: &Path) -> Result<Vec<u8, N>> {
let mut contents = Vec::new();
self.open_file_and_then(path, &mut |file| {
file.read_to_end(&mut contents)?;
Expand All @@ -227,7 +227,7 @@ impl dyn DynFilesystem + '_ {
Ok(contents)
}

pub fn read_file_chunk<const N: usize>(
pub fn read_chunk<const N: usize>(
&self,
path: &Path,
pos: OpenSeekFrom,
Expand Down

0 comments on commit 937efcf

Please sign in to comment.