mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-04 19:08:04 +00:00
Bump MSRV to 1.84 (#12670)
## Summary Closes https://github.com/astral-sh/uv/issues/12649.
This commit is contained in:
parent
420fc287fa
commit
42dcea0ee2
64 changed files with 162 additions and 144 deletions
|
@ -24,7 +24,7 @@ pub fn is_same_file_allow_missing(left: &Path, right: &Path) -> Option<bool> {
|
|||
// Second, check the files directly.
|
||||
if let Ok(value) = same_file::is_same_file(left, right) {
|
||||
return Some(value);
|
||||
};
|
||||
}
|
||||
|
||||
// Often, one of the directories won't exist yet so perform the comparison up a level.
|
||||
if let (Some(left_parent), Some(right_parent), Some(left_name), Some(right_name)) = (
|
||||
|
@ -38,7 +38,7 @@ pub fn is_same_file_allow_missing(left: &Path, right: &Path) -> Option<bool> {
|
|||
Ok(false) => return Some(false),
|
||||
_ => (),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// We couldn't determine if they're the same.
|
||||
None
|
||||
|
@ -106,7 +106,7 @@ pub fn replace_symlink(src: impl AsRef<Path>, dst: impl AsRef<Path>) -> std::io:
|
|||
},
|
||||
Err(err) if err.kind() == std::io::ErrorKind::NotFound => {}
|
||||
Err(err) => return Err(err),
|
||||
};
|
||||
}
|
||||
|
||||
// Replace it with a new symlink.
|
||||
junction::create(
|
||||
|
@ -411,7 +411,7 @@ pub async fn persist_with_retry(
|
|||
to.display(),
|
||||
error_message,
|
||||
);
|
||||
};
|
||||
}
|
||||
})
|
||||
.await;
|
||||
|
||||
|
@ -485,7 +485,7 @@ pub fn persist_with_retry_sync(
|
|||
to.display(),
|
||||
error_message,
|
||||
);
|
||||
};
|
||||
}
|
||||
})
|
||||
.call();
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ fn normalized(path: &Path) -> PathBuf {
|
|||
normalized.push(component);
|
||||
}
|
||||
Component::ParentDir => {
|
||||
match normalized.components().last() {
|
||||
match normalized.components().next_back() {
|
||||
None | Some(Component::ParentDir | Component::RootDir) => {
|
||||
// Preserve leading and above-root `..`
|
||||
normalized.push(component);
|
||||
|
@ -331,7 +331,7 @@ pub fn relative_to(
|
|||
|
||||
// go as many levels up as required
|
||||
let levels_up = base.components().count() - common_prefix.components().count();
|
||||
let up = std::iter::repeat("..").take(levels_up).collect::<PathBuf>();
|
||||
let up = std::iter::repeat_n("..", levels_up).collect::<PathBuf>();
|
||||
|
||||
Ok(up.join(stripped))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue