Skip to content

Commit 8f5d7c5

Browse files
authored
refactor: remove unused async from InMemory::entry (#7133)
1 parent d4b9482 commit 8f5d7c5

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

object_store/src/memory.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ impl ObjectStore for InMemory {
235235
}
236236

237237
async fn get_opts(&self, location: &Path, options: GetOptions) -> Result<GetResult> {
238-
let entry = self.entry(location).await?;
238+
let entry = self.entry(location)?;
239239
let e_tag = entry.e_tag.to_string();
240240

241241
let meta = ObjectMeta {
@@ -270,7 +270,7 @@ impl ObjectStore for InMemory {
270270
}
271271

272272
async fn get_ranges(&self, location: &Path, ranges: &[Range<u64>]) -> Result<Vec<Bytes>> {
273-
let entry = self.entry(location).await?;
273+
let entry = self.entry(location)?;
274274
ranges
275275
.iter()
276276
.map(|range| {
@@ -295,7 +295,7 @@ impl ObjectStore for InMemory {
295295
}
296296

297297
async fn head(&self, location: &Path) -> Result<ObjectMeta> {
298-
let entry = self.entry(location).await?;
298+
let entry = self.entry(location)?;
299299

300300
Ok(ObjectMeta {
301301
location: location.clone(),
@@ -390,15 +390,15 @@ impl ObjectStore for InMemory {
390390
}
391391

392392
async fn copy(&self, from: &Path, to: &Path) -> Result<()> {
393-
let entry = self.entry(from).await?;
393+
let entry = self.entry(from)?;
394394
self.storage
395395
.write()
396396
.insert(to, entry.data, entry.attributes);
397397
Ok(())
398398
}
399399

400400
async fn copy_if_not_exists(&self, from: &Path, to: &Path) -> Result<()> {
401-
let entry = self.entry(from).await?;
401+
let entry = self.entry(from)?;
402402
let mut storage = self.storage.write();
403403
if storage.map.contains_key(to) {
404404
return Err(Error::AlreadyExists {
@@ -483,7 +483,7 @@ impl InMemory {
483483
Self { storage }
484484
}
485485

486-
async fn entry(&self, location: &Path) -> Result<Entry> {
486+
fn entry(&self, location: &Path) -> Result<Entry> {
487487
let storage = self.storage.read();
488488
let value = storage
489489
.map

0 commit comments

Comments
 (0)