Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: enable most macOS funcs for apple_targets #2241

Merged
merged 3 commits into from
Dec 2, 2023

Conversation

SteveLauC
Copy link
Member

@SteveLauC SteveLauC commented Dec 1, 2023

What does this PR do

  1. Enable most macOS functions for apple_targets
  2. Enable ClockId::setime() and time::clock_settime() on macOS

Closes #2238

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

src/time.rs Show resolved Hide resolved
@@ -0,0 +1 @@
`ClockId::set_time()` has been disabled on iOS/tvOS/watchOS given that it is only available on macOS
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was already disabled on iOS/tvOS/watchOS. Shouldn't this read "ClockId::set_time is now enabled on macos" ?

src/time.rs Outdated
Comment on lines 43 to 44
#[cfg(not(any(
target_os = "macos",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you not notice the not ?

Suggested change
#[cfg(not(any(
target_os = "macos",
#[cfg(not(any(
target_os = "ios",
target_os = "tvos",
target_os = "watchos",

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I am sorry I missed that, fixed!

@asomers asomers added this pull request to the merge queue Dec 2, 2023
Merged via the queue into nix-rust:master with commit e95162f Dec 2, 2023
34 checks passed
@SteveLauC SteveLauC deleted the apple_targets branch December 2, 2023 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable most macos functions on all of apple_targets
2 participants