Skip to content

Commit

Permalink
Merge Apple std::os extensions modules
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Apr 10, 2024
1 parent b14d8b2 commit 288e3ba
Show file tree
Hide file tree
Showing 14 changed files with 22 additions and 757 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::sys_common::{AsInner, AsInnerMut, IntoInner};
use crate::time::SystemTime;

#[allow(deprecated)]
use crate::os::macos::raw;
use super::raw;

/// OS-specific extensions to [`fs::Metadata`].
///
Expand Down Expand Up @@ -70,6 +70,7 @@ pub trait MetadataExt {
fn st_gen(&self) -> u32;
#[stable(feature = "metadata_ext2", since = "1.8.0")]
fn st_lspare(&self) -> u32;
#[cfg(target_os = "macos")]
#[stable(feature = "metadata_ext2", since = "1.8.0")]
fn st_qspare(&self) -> [u64; 2];
}
Expand Down Expand Up @@ -143,6 +144,7 @@ impl MetadataExt for Metadata {
fn st_lspare(&self) -> u32 {
self.as_inner().as_inner().st_lspare as u32
}
#[cfg(target_os = "macos")]
fn st_qspare(&self) -> [u64; 2] {
let qspare = self.as_inner().as_inner().st_qspare;
[qspare[0] as u64, qspare[1] as u64]
Expand Down
9 changes: 9 additions & 0 deletions library/std/src/os/apple/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#![cfg_attr(target_os = "ios", doc = "iOS-specific definitions")]
#![cfg_attr(target_os = "macos", doc = "macOS-specific definitions")]
#![cfg_attr(target_os = "tvos", doc = "tvOS-specific definitions")]
#![cfg_attr(target_os = "visionos", doc = "visionOS-specific definitions")]
#![cfg_attr(target_os = "watchos", doc = "watchOS-specific definitions")]
#![stable(feature = "raw_ext", since = "1.1.0")]

pub mod fs;
pub mod raw;
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//! visionos-specific raw type definitions
#![cfg_attr(target_os = "ios", doc = "iOS-specific raw type definitions")]
#![cfg_attr(target_os = "macos", doc = "macOS-specific raw type definitions")]
#![cfg_attr(target_os = "tvos", doc = "tvOS-specific raw type definitions")]
#![cfg_attr(target_os = "visionos", doc = "visionOS-specific raw type definitions")]
#![cfg_attr(target_os = "watchos", doc = "watchOS-specific raw type definitions")]
#![stable(feature = "raw_ext", since = "1.1.0")]
#![deprecated(
since = "1.8.0",
Expand Down
160 changes: 0 additions & 160 deletions library/std/src/os/ios/fs.rs

This file was deleted.

6 changes: 0 additions & 6 deletions library/std/src/os/ios/mod.rs

This file was deleted.

83 changes: 0 additions & 83 deletions library/std/src/os/ios/raw.rs

This file was deleted.

6 changes: 0 additions & 6 deletions library/std/src/os/macos/mod.rs

This file was deleted.

83 changes: 0 additions & 83 deletions library/std/src/os/macos/raw.rs

This file was deleted.

Loading

0 comments on commit 288e3ba

Please sign in to comment.