mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 02:31:18 -03:00
Comment some possible changes if we increase MSRV
This commit is contained in:
@@ -776,7 +776,7 @@ fn save(&mut self, directory: &wstr) -> bool {
|
||||
|
||||
// Ensure we maintain ownership and permissions (#2176).
|
||||
if let Ok(md) = wstat(&real_path) {
|
||||
// TODO: Consider replacing with std::os::unix::fs::fchown when MSRV >= 1.73
|
||||
// TODO(MSRV): Consider replacing with std::os::unix::fs::fchown when MSRV >= 1.73
|
||||
if unsafe { libc::fchown(private_file.as_raw_fd(), md.uid(), md.gid()) } == -1 {
|
||||
FLOG!(uvar_file, "universal log fchown() failed:", errno());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
//! stdlib backports
|
||||
|
||||
// TODO(MSRV): is_none_or was added in rust 1.82
|
||||
pub trait IsSomeAnd {
|
||||
type Type;
|
||||
#[allow(clippy::wrong_self_convention)]
|
||||
@@ -15,6 +16,7 @@ fn is_none_or(self, f: impl FnOnce(T) -> bool) -> bool {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(MSRV): is_sorted_by was added in rust 1.82
|
||||
pub trait IsSorted {
|
||||
type T;
|
||||
fn is_sorted_by(&self, pred: impl Fn(&Self::T, &Self::T) -> Option<std::cmp::Ordering>)
|
||||
|
||||
@@ -767,7 +767,7 @@ fn save_internal_via_rewrite(&mut self) {
|
||||
// case right either).
|
||||
if let Ok(target_file_after) = target_file_after.as_ref() {
|
||||
if let Ok(md) = target_file_after.metadata() {
|
||||
// TODO: Consider replacing with std::os::unix::fs::fchown when MSRV >= 1.73
|
||||
// TODO(MSRV): Consider replacing with std::os::unix::fs::fchown when MSRV >= 1.73
|
||||
if unsafe { fchown(tmp_file.as_raw_fd(), md.uid(), md.gid()) } == -1 {
|
||||
FLOG!(
|
||||
history_file,
|
||||
|
||||
Reference in New Issue
Block a user