diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-06-03 18:48:59 +0200 |
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2024-07-14 15:31:54 +0200 |
| commit | 306d5788a684e71cc5dc03c71da3b2e26672b6a3 (patch) | |
| tree | 172f8575ef53f68e7a5c270d9e5d5a93462aca10 /library/std/src/fs | |
| parent | bcf94dec5ba6838e435902120c0384c360126a26 (diff) | |
Merge Apple `std::os` extensions modules into `std::os::darwin`
The functionality available on Apple platforms are very similar, and were duplicated for each platform. Additionally, this fixes a warning when compiling the standard library for tvOS, watchOS and visionOS by marking the corresponding code as dead code.
Diffstat (limited to 'library/std/src/fs')
| -rw-r--r-- | library/std/src/fs/tests.rs | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 62a268facb6..f1749efdfa9 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -1638,16 +1638,8 @@ fn rename_directory() { #[test] fn test_file_times() { - #[cfg(target_os = "ios")] - use crate::os::ios::fs::FileTimesExt; - #[cfg(target_os = "macos")] - use crate::os::macos::fs::FileTimesExt; - #[cfg(target_os = "tvos")] - use crate::os::tvos::fs::FileTimesExt; - #[cfg(target_os = "visionos")] - use crate::os::visionos::fs::FileTimesExt; - #[cfg(target_os = "watchos")] - use crate::os::watchos::fs::FileTimesExt; + #[cfg(target_vendor = "apple")] + use crate::os::darwin::fs::FileTimesExt; #[cfg(windows)] use crate::os::windows::fs::FileTimesExt; @@ -1693,16 +1685,7 @@ fn test_file_times() { #[test] #[cfg(target_vendor = "apple")] fn test_file_times_pre_epoch_with_nanos() { - #[cfg(target_os = "ios")] - use crate::os::ios::fs::FileTimesExt; - #[cfg(target_os = "macos")] - use crate::os::macos::fs::FileTimesExt; - #[cfg(target_os = "tvos")] - use crate::os::tvos::fs::FileTimesExt; - #[cfg(target_os = "visionos")] - use crate::os::visionos::fs::FileTimesExt; - #[cfg(target_os = "watchos")] - use crate::os::watchos::fs::FileTimesExt; + use crate::os::darwin::fs::FileTimesExt; let tmp = tmpdir(); let file = File::create(tmp.join("foo")).unwrap(); |
