Bump MSRV to 1.84 (#12670)

## Summary

Closes https://github.com/astral-sh/uv/issues/12649.
This commit is contained in:
Charlie Marsh 2025-04-04 11:49:26 -04:00 committed by GitHub
parent 420fc287fa
commit 42dcea0ee2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
64 changed files with 162 additions and 144 deletions

View file

@ -978,7 +978,7 @@ pub fn find_python_installations<'a>(
PythonRequest::Version(version) => {
if let Err(err) = version.check_supported() {
return Box::new(iter::once(Err(Error::InvalidVersionRequest(err))));
};
}
Box::new({
debug!("Searching for {request} in {sources}");
python_interpreters(version, None, environments, preference, cache)
@ -1004,7 +1004,7 @@ pub fn find_python_installations<'a>(
PythonRequest::ImplementationVersion(implementation, version) => {
if let Err(err) = version.check_supported() {
return Box::new(iter::once(Err(Error::InvalidVersionRequest(err))));
};
}
Box::new({
debug!("Searching for {request} in {sources}");
python_interpreters(
@ -1026,8 +1026,8 @@ pub fn find_python_installations<'a>(
if let Some(version) = request.version() {
if let Err(err) = version.check_supported() {
return Box::new(iter::once(Err(Error::InvalidVersionRequest(err))));
};
};
}
}
Box::new({
debug!("Searching for {request} in {sources}");
python_interpreters(

View file

@ -555,7 +555,7 @@ impl ManagedPythonDownload {
return Ok(DownloadResult::AlreadyAvailable(path));
}
let filename = url.path_segments().unwrap().last().unwrap();
let filename = url.path_segments().unwrap().next_back().unwrap();
let ext = SourceDistExtension::from_path(filename)
.map_err(|err| Error::MissingExtension(url.to_string(), err))?;
let (reader, size) = read_url(&url, client).await?;
@ -593,7 +593,7 @@ impl ManagedPythonDownload {
.await
.map_err(|err| Error::ExtractError(filename.to_string(), err))?;
}
};
}
hasher.finish().await.map_err(Error::HashExhaustion)?;

View file

@ -177,7 +177,7 @@ impl PythonEnvironment {
}));
}
Err(err) => return Err(Error::Discovery(err.into())),
};
}
if root.as_ref().is_file() {
return Err(InvalidEnvironment {
@ -211,7 +211,7 @@ impl PythonEnvironment {
kind: InvalidEnvironmentKind::MissingExecutable(executable.clone()),
}
.into());
};
}
let interpreter = Interpreter::query(executable, cache)?;

View file

@ -162,7 +162,7 @@ mod tests {
match self.search_path.as_mut() {
Some(paths) => paths.push(path),
None => self.search_path = Some(vec![path]),
};
}
}
/// Create a new directory and add it to the search path.

View file

@ -496,7 +496,7 @@ impl ManagedPythonInstallation {
err,
})
}
};
}
}
Ok(())

View file

@ -224,7 +224,7 @@ fn find_sysconfigdata(
let metadata = entry.metadata()?;
if metadata.is_symlink() {
continue;
};
}
if metadata.is_file() {
return Ok(entry.path());

View file

@ -111,7 +111,7 @@ pub(crate) fn conda_environment_from_env(kind: CondaEnvironmentKind) -> Option<P
if kind != CondaEnvironmentKind::from_prefix_path(&path) {
return None;
};
}
Some(path)
}

View file

@ -243,7 +243,7 @@ pub fn remove_registry_entry<'a>(
.context("Failed to clear registry entries under HKCU:\\{python_entry}"),
));
}
};
}
}
}
@ -284,6 +284,6 @@ pub fn remove_orphan_registry_entries(installations: &[ManagedPythonInstallation
if let Err(err) = CURRENT_USER.remove_tree(&python_entry) {
// TODO(konsti): We don't have an installation key here.
warn_user_once!("Failed to remove orphan registry key HKCU:\\{python_entry}: {err}");
};
}
}
}