This is an automated email from the ASF dual-hosted git repository.

mneumann pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new 8f5d7c583d refactor: remove unused `async` from `InMemory::entry` 
(#7133)
8f5d7c583d is described below

commit 8f5d7c583d0e08dabb194818de6c9e5096306a7b
Author: Marco Neumann <[email protected]>
AuthorDate: Fri Feb 14 14:00:10 2025 +0100

    refactor: remove unused `async` from `InMemory::entry` (#7133)
---
 object_store/src/memory.rs | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/object_store/src/memory.rs b/object_store/src/memory.rs
index 26beff1e1f..f03dbc6d00 100644
--- a/object_store/src/memory.rs
+++ b/object_store/src/memory.rs
@@ -235,7 +235,7 @@ impl ObjectStore for InMemory {
     }
 
     async fn get_opts(&self, location: &Path, options: GetOptions) -> 
Result<GetResult> {
-        let entry = self.entry(location).await?;
+        let entry = self.entry(location)?;
         let e_tag = entry.e_tag.to_string();
 
         let meta = ObjectMeta {
@@ -270,7 +270,7 @@ impl ObjectStore for InMemory {
     }
 
     async fn get_ranges(&self, location: &Path, ranges: &[Range<u64>]) -> 
Result<Vec<Bytes>> {
-        let entry = self.entry(location).await?;
+        let entry = self.entry(location)?;
         ranges
             .iter()
             .map(|range| {
@@ -295,7 +295,7 @@ impl ObjectStore for InMemory {
     }
 
     async fn head(&self, location: &Path) -> Result<ObjectMeta> {
-        let entry = self.entry(location).await?;
+        let entry = self.entry(location)?;
 
         Ok(ObjectMeta {
             location: location.clone(),
@@ -390,7 +390,7 @@ impl ObjectStore for InMemory {
     }
 
     async fn copy(&self, from: &Path, to: &Path) -> Result<()> {
-        let entry = self.entry(from).await?;
+        let entry = self.entry(from)?;
         self.storage
             .write()
             .insert(to, entry.data, entry.attributes);
@@ -398,7 +398,7 @@ impl ObjectStore for InMemory {
     }
 
     async fn copy_if_not_exists(&self, from: &Path, to: &Path) -> Result<()> {
-        let entry = self.entry(from).await?;
+        let entry = self.entry(from)?;
         let mut storage = self.storage.write();
         if storage.map.contains_key(to) {
             return Err(Error::AlreadyExists {
@@ -483,7 +483,7 @@ impl InMemory {
         Self { storage }
     }
 
-    async fn entry(&self, location: &Path) -> Result<Entry> {
+    fn entry(&self, location: &Path) -> Result<Entry> {
         let storage = self.storage.read();
         let value = storage
             .map

Reply via email to