Skip to content

Commit

Permalink
Fix compilation on Rust beta.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunfishcode committed Aug 23, 2022
1 parent 949f251 commit cd966ac
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cap-primitives/src/rustix/linux/fs/set_times_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
use super::procfs::set_times_through_proc_self_fd;
use crate::fs::{open, OpenOptions, SystemTimeSpec};
use fs_set_times::SetTimes;
use std::path::Path;
use std::{fs, io};

Expand All @@ -17,7 +16,8 @@ pub(crate) fn set_times_impl(
// access, so first try write.
match open(start, path, OpenOptions::new().write(true)) {
Ok(file) => {
return file.set_times(
return fs_set_times::SetTimes::set_times(
&file,
atime.map(SystemTimeSpec::into_std),
mtime.map(SystemTimeSpec::into_std),
)
Expand All @@ -31,7 +31,8 @@ pub(crate) fn set_times_impl(
// Next try read.
match open(start, path, OpenOptions::new().read(true)) {
Ok(file) => {
return file.set_times(
return fs_set_times::SetTimes::set_times(
&file,
atime.map(SystemTimeSpec::into_std),
mtime.map(SystemTimeSpec::into_std),
)
Expand Down

0 comments on commit cd966ac

Please sign in to comment.