Rename Distribution to Dist in all structs and traits (#384)

We tend to avoid abbreviations, but this one is just so long and
absolutely ubiquitous.
This commit is contained in:
Charlie Marsh 2023-11-10 06:55:11 -08:00 committed by GitHub
parent 5cef40d87a
commit 6a15950cb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 471 additions and 548 deletions

View file

@ -90,7 +90,7 @@ pub fn find_dist_info<'a, T: Copy>(
let (dist_info_dir, file) = path.split_once('/')?;
let dir_stem = dist_info_dir.strip_suffix(".dist-info")?;
let (name, version) = dir_stem.rsplit_once('-')?;
if PackageName::from_str(name).ok()? == filename.distribution
if PackageName::from_str(name).ok()? == filename.name
&& Version::from_str(version).ok()? == filename.version
&& file == "METADATA"
{

View file

@ -904,7 +904,7 @@ pub fn install_wheel(
_extras: &[String],
sys_executable: impl AsRef<Path>,
) -> Result<String, Error> {
let name = &filename.distribution;
let name = &filename.name;
let _my_span = span!(Level::DEBUG, "install_wheel", name = name.as_ref());
let base_location = location.venv_root();