From 937efcfd972d61021f47f44ab2292dc91539e612 Mon Sep 17 00:00:00 2001 From: Robin Krahl Date: Fri, 15 Dec 2023 16:43:51 +0100 Subject: [PATCH] fixup! Add object-safe traits for File, Filesystem, Storage Rename read_file and read_file_chunk for consistency --- src/object_safe.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object_safe.rs b/src/object_safe.rs index 258c20654..e347ccdc1 100644 --- a/src/object_safe.rs +++ b/src/object_safe.rs @@ -218,7 +218,7 @@ impl DynFilesystem for Filesystem<'_, S> { } impl dyn DynFilesystem + '_ { - pub fn read_file(&self, path: &Path) -> Result> { + pub fn read(&self, path: &Path) -> Result> { let mut contents = Vec::new(); self.open_file_and_then(path, &mut |file| { file.read_to_end(&mut contents)?; @@ -227,7 +227,7 @@ impl dyn DynFilesystem + '_ { Ok(contents) } - pub fn read_file_chunk( + pub fn read_chunk( &self, path: &Path, pos: OpenSeekFrom,