mirror of https://github.com/astral-sh/uv
fmt
This commit is contained in:
parent
6f2ce53311
commit
a01097a061
|
|
@ -118,8 +118,7 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context>
|
||||||
let wheel_filename = WheelFilename::from_str(&wheel.file.filename)?;
|
let wheel_filename = WheelFilename::from_str(&wheel.file.filename)?;
|
||||||
let cache_entry = self.cache.entry(
|
let cache_entry = self.cache.entry(
|
||||||
CacheBucket::Wheels,
|
CacheBucket::Wheels,
|
||||||
WheelCache::Index(&wheel.index)
|
WheelCache::Index(&wheel.index).remote_wheel_dir(wheel_filename.name.as_ref()),
|
||||||
.remote_wheel_dir(wheel_filename.name.as_ref()),
|
|
||||||
wheel_filename.stem(),
|
wheel_filename.stem(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
@ -197,7 +196,7 @@ impl<'a, Context: BuildContext + Send + Sync> DistributionDatabase<'a, Context>
|
||||||
CacheBucket::Wheels,
|
CacheBucket::Wheels,
|
||||||
WheelCache::Index(&wheel.index)
|
WheelCache::Index(&wheel.index)
|
||||||
.remote_wheel_dir(wheel_filename.name.as_ref()),
|
.remote_wheel_dir(wheel_filename.name.as_ref()),
|
||||||
filename, // TODO should this be filename.stem() to match the other branch?
|
filename, // TODO should this be filename.stem() to match the other branch?
|
||||||
);
|
);
|
||||||
fs::create_dir_all(&cache_entry.dir()).await?;
|
fs::create_dir_all(&cache_entry.dir()).await?;
|
||||||
tokio::fs::rename(temp_file, &cache_entry.path()).await?;
|
tokio::fs::rename(temp_file, &cache_entry.path()).await?;
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
|
use tokio_util::compat::FuturesAsyncReadCompatExt;
|
||||||
use zip::result::ZipError;
|
use zip::result::ZipError;
|
||||||
use zip::ZipArchive;
|
use zip::ZipArchive;
|
||||||
use tokio_util::compat::FuturesAsyncReadCompatExt;
|
|
||||||
|
|
||||||
pub use crate::vendor::{CloneableSeekableReader, HasLength};
|
pub use crate::vendor::{CloneableSeekableReader, HasLength};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -235,8 +235,8 @@ impl<'a, Context: BuildContext + Send + Sync> Downloader<'a, Context> {
|
||||||
Ok(download.target().to_path_buf())
|
Ok(download.target().to_path_buf())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.await?
|
.await?
|
||||||
.map_err(|err| Error::Unzip(remote.clone(), err))?
|
.map_err(|err| Error::Unzip(remote.clone(), err))?
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(CachedDist::from_remote(remote, filename, normalized_path))
|
Ok(CachedDist::from_remote(remote, filename, normalized_path))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue