From 124278a58ca305bdc8645d1ef4c0db43220518b4 Mon Sep 17 00:00:00 2001 From: Alexander Weiss Date: Thu, 29 Aug 2024 22:21:59 +0200 Subject: [PATCH] fix: fix rust 1.76 error due to temporary value being dropped --- core/src/services/fs/lister.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/src/services/fs/lister.rs b/core/src/services/fs/lister.rs index 1b8ae3bd6649..9245cb82664e 100644 --- a/core/src/services/fs/lister.rs +++ b/core/src/services/fs/lister.rs @@ -152,13 +152,13 @@ impl oio::BlockingList for FsLister { meta }; - let p = if metadata.is_dir() { + let entry = if metadata.is_dir() { // Make sure we are returning the correct path. - &format!("{rel_path}/") + oio::Entry::new(&format!("{rel_path}/"), metadata) } else { - &rel_path + oio::Entry::new(&rel_path, metadata) }; - Ok(Some(oio::Entry::new(p, metadata))) + Ok(Some(entry)) } }