From 9fd3b8298da7e706ff36c3fb877783bbeed8d93b Mon Sep 17 00:00:00 2001 From: Charlie Marsh Date: Mon, 22 Jan 2024 19:14:29 -0500 Subject: [PATCH] Use `fs_err::tokio` consistently in distribution database (#1055) --- crates/puffin-distribution/src/distribution_database.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/puffin-distribution/src/distribution_database.rs b/crates/puffin-distribution/src/distribution_database.rs index 9139e389b..8d755c24d 100644 --- a/crates/puffin-distribution/src/distribution_database.rs +++ b/crates/puffin-distribution/src/distribution_database.rs @@ -4,7 +4,6 @@ use std::path::Path; use std::str::FromStr; use std::sync::Arc; -use fs_err::tokio as fs; use futures::FutureExt; use thiserror::Error; use tokio::task::JoinError; @@ -177,7 +176,7 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context> WheelCache::Index(&wheel.index).remote_wheel_dir(wheel_filename.name.as_ref()), wheel_filename.stem(), ); - fs::create_dir_all(&cache_entry.dir()).await?; + fs_err::tokio::create_dir_all(&cache_entry.dir()).await?; let target = cache_entry.into_path_buf(); fs_err::tokio::rename(temp_target, &target).await?; @@ -206,7 +205,7 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context> WheelCache::Url(&wheel.url).remote_wheel_dir(wheel.name().as_ref()), wheel.filename.stem(), ); - fs::create_dir_all(&cache_entry.dir()).await?; + fs_err::tokio::create_dir_all(&cache_entry.dir()).await?; let target = cache_entry.into_path_buf(); fs_err::tokio::rename(temp_target, &target).await?;