Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix rust 1.76 error due to temporary value being dropped #5071

Merged
merged 1 commit into from
Aug 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions core/src/services/fs/lister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,13 +152,13 @@ impl oio::BlockingList for FsLister<std::fs::ReadDir> {
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))
}
}
Loading