Skip to content

Commit

Permalink
Merge #1943
Browse files Browse the repository at this point in the history
1943: Rustier kqueue API r=rtzoeller a=asomers

* Prefer methods instead of functions.
* Create a newtype for a kqueue.
* Document everything.
* Deprecate EVFILT_SENDFILE, because it was never fully implemented upstream.
* Add support to the libc_enum! macro to be able to deprecate variants.

Co-authored-by: Alan Somers <[email protected]>
  • Loading branch information
bors[bot] and asomers authored Feb 10, 2023
2 parents c42b649 + 34f0eea commit 2a40128
Show file tree
Hide file tree
Showing 4 changed files with 188 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- With I/O-safe type applied in `pty::OpenptyResult` and `pty::ForkptyResult`,
users no longer need to manually close the file descriptors in these types.
([#1921](https://github.com/nix-rust/nix/pull/1921))
- `sys::event::{kevent, kevent_ts}` are deprecated in favor of
`sys::kevent::Kqueue::kevent`, and `sys::event::kqueue` is deprecated in
favor of `sys::kevent::Kqueue::new`.
([#1943](https://github.com/nix-rust/nix/pull/1943))

### Fixed
- Fix `SockaddrIn6` bug that was swapping flowinfo and scope_id byte ordering.
Expand Down
2 changes: 2 additions & 0 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ macro_rules! libc_enum {
impl ::std::convert::TryFrom<$repr> for $BitFlags {
type Error = $crate::Error;
#[allow(unused_doc_comments)]
#[allow(deprecated)]
#[allow(unused_attributes)]
fn try_from(x: $repr) -> $crate::Result<Self> {
match x {
$($try_froms)*
Expand Down
Loading

0 comments on commit 2a40128

Please sign in to comment.