From 5486ca90d1c5a94b32d809b19b03546b6e38aaab Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 21 Jun 2022 15:22:03 -0700 Subject: [PATCH] Remove `File::with_options`. `File::with_options` was renamed to `File::options`. cap-std already has the new name, so this just removes the old name. --- cap-async-std/src/fs/file.rs | 2 -- cap-async-std/src/fs_utf8/file.rs | 2 -- cap-std/src/fs/file.rs | 9 --------- cap-std/src/fs_utf8/file.rs | 9 --------- 4 files changed, 22 deletions(-) diff --git a/cap-async-std/src/fs/file.rs b/cap-async-std/src/fs/file.rs index 29a03a15..44a850a3 100644 --- a/cap-async-std/src/fs/file.rs +++ b/cap-async-std/src/fs/file.rs @@ -55,8 +55,6 @@ impl File { self.std } - // async_std doesn't have `with_options`. - /// Attempts to sync all OS-internal metadata to disk. /// /// This corresponds to [`async_std::fs::File::sync_all`]. diff --git a/cap-async-std/src/fs_utf8/file.rs b/cap-async-std/src/fs_utf8/file.rs index 0bffb61b..8606118d 100644 --- a/cap-async-std/src/fs_utf8/file.rs +++ b/cap-async-std/src/fs_utf8/file.rs @@ -59,8 +59,6 @@ impl File { self.cap_std.into_std() } - // async_std doesn't have `with_options`. - /// Attempts to sync all OS-internal metadata to disk. /// /// This corresponds to [`async_std::fs::File::sync_all`]. diff --git a/cap-std/src/fs/file.rs b/cap-std/src/fs/file.rs index 8a29717c..d3a13427 100644 --- a/cap-std/src/fs/file.rs +++ b/cap-std/src/fs/file.rs @@ -47,15 +47,6 @@ impl File { self.std } - /// Returns a new [`OpenOptions`] object. - /// - /// This corresponds to [`std::fs::File::with_options`]. - #[inline] - #[cfg(with_options)] - pub fn with_options() -> OpenOptions { - OpenOptions::new() - } - /// Attempts to sync all OS-internal metadata to disk. /// /// This corresponds to [`std::fs::File::sync_all`]. diff --git a/cap-std/src/fs_utf8/file.rs b/cap-std/src/fs_utf8/file.rs index 52cd6dcc..ebfa56e7 100644 --- a/cap-std/src/fs_utf8/file.rs +++ b/cap-std/src/fs_utf8/file.rs @@ -55,15 +55,6 @@ impl File { self.cap_std.into_std() } - /// Returns a new `OpenOptions` object. - /// - /// This corresponds to [`std::fs::File::with_options`]. - #[inline] - #[cfg(with_options)] - pub fn with_options() -> OpenOptions { - crate::fs::File::with_options() - } - /// Attempts to sync all OS-internal metadata to disk. /// /// This corresponds to [`std::fs::File::sync_all`].