From cd966ac70595391b2382c1ef75c179847a845878 Mon Sep 17 00:00:00 2001
From: Dan Gohman <dev@sunfishcode.online>
Date: Tue, 23 Aug 2022 13:36:15 -0700
Subject: [PATCH] Fix compilation on Rust beta.

---
 vendor/cap-primitives/src/rustix/linux/fs/set_times_impl.rs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/vendor/cap-primitives/src/rustix/linux/fs/set_times_impl.rs b/vendor/cap-primitives/src/rustix/linux/fs/set_times_impl.rs
index 9a2da047..5844c7d7 100644
--- a/vendor/cap-primitives/src/rustix/linux/fs/set_times_impl.rs
+++ b/vendor/cap-primitives/src/rustix/linux/fs/set_times_impl.rs
@@ -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};
 
@@ -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),
             )
@@ -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),
             )
