Comment some possible changes if we increase MSRV

This commit is contained in:
Fabian Boehm
2025-04-23 17:27:01 +02:00
parent 97641c7bf6
commit f222db609f
3 changed files with 4 additions and 2 deletions

View File

@@ -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());
}

View File

@@ -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>)

View File

@@ -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,