From ffe7ee5ce6db1d75b637619497fda732f1c7018d Mon Sep 17 00:00:00 2001 From: Ruben Arts Date: Mon, 23 Sep 2024 14:55:39 +0200 Subject: [PATCH] another fmt and clippy --- crates/rattler_repodata_gateway/src/fetch/mod.rs | 2 +- crates/rattler_repodata_gateway/src/sparse/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/rattler_repodata_gateway/src/fetch/mod.rs b/crates/rattler_repodata_gateway/src/fetch/mod.rs index 54f70564a..4fa1dfa98 100644 --- a/crates/rattler_repodata_gateway/src/fetch/mod.rs +++ b/crates/rattler_repodata_gateway/src/fetch/mod.rs @@ -435,7 +435,7 @@ pub async fn fetch_repo_data( cache_state .to_path(&cache_state_path) .map(|_| cache_state) - .map_err(|e| FetchRepoDataError::FailedToWriteCacheState(e)) + .map_err(FetchRepoDataError::FailedToWriteCacheState) }) .await??; diff --git a/crates/rattler_repodata_gateway/src/sparse/mod.rs b/crates/rattler_repodata_gateway/src/sparse/mod.rs index bc543af88..dea1363ab 100644 --- a/crates/rattler_repodata_gateway/src/sparse/mod.rs +++ b/crates/rattler_repodata_gateway/src/sparse/mod.rs @@ -103,7 +103,7 @@ impl SparseRepoData { path: impl AsRef, patch_function: Option, ) -> Result { - let file = fs::File::open(path)?; + let file = fs::File::open(path.as_ref().to_owned())?; let memory_map = unsafe { memmap2::Mmap::map(&file) }?; Ok(SparseRepoData { inner: SparseRepoDataInner::Memmapped(