mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-16 21:38:31 +00:00
Apply some Edition 2024 fixes (#13479)
Some `ref`-removal and `use<>` fixes for the Rust Edition 2024 migration, which are also compatible with Rust Edition 2021.
This commit is contained in:
parent
0baa376627
commit
23261b7e2e
17 changed files with 51 additions and 53 deletions
|
@ -191,7 +191,7 @@ impl ManagedPythonInstallations {
|
|||
/// This ensures a consistent ordering across all platforms.
|
||||
pub fn find_all(
|
||||
&self,
|
||||
) -> Result<impl DoubleEndedIterator<Item = ManagedPythonInstallation>, Error> {
|
||||
) -> Result<impl DoubleEndedIterator<Item = ManagedPythonInstallation> + use<>, Error> {
|
||||
let dirs = match fs_err::read_dir(&self.root) {
|
||||
Ok(installation_dirs) => {
|
||||
// Collect sorted directory paths; `read_dir` is not stable across platforms
|
||||
|
@ -243,7 +243,7 @@ impl ManagedPythonInstallations {
|
|||
/// Iterate over Python installations that support the current platform.
|
||||
pub fn find_matching_current_platform(
|
||||
&self,
|
||||
) -> Result<impl DoubleEndedIterator<Item = ManagedPythonInstallation>, Error> {
|
||||
) -> Result<impl DoubleEndedIterator<Item = ManagedPythonInstallation> + use<>, Error> {
|
||||
let os = Os::from_env();
|
||||
let arch = Arch::from_env();
|
||||
let libc = Libc::from_env()?;
|
||||
|
@ -269,7 +269,7 @@ impl ManagedPythonInstallations {
|
|||
/// - The platform metadata cannot be read
|
||||
/// - A directory for the installation cannot be read
|
||||
pub fn find_version<'a>(
|
||||
&self,
|
||||
&'a self,
|
||||
version: &'a PythonVersion,
|
||||
) -> Result<impl DoubleEndedIterator<Item = ManagedPythonInstallation> + 'a, Error> {
|
||||
Ok(self
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue