nix-rust / nix

Rust friendly bindings to *nix APIs
MIT License
2.67k stars 667 forks source link

Confusing deprecation notice for `sys::epoll::epoll_ctl` #2531

Closed pacak closed 2 weeks ago

pacak commented 2 weeks ago

https://docs.rs/nix/latest/nix/sys/epoll/fn.epoll_ctl.html

Currently it says "👎Deprecated since 0.27.0: Use Epoll::epoll_ctl() instead", but Epoll::epoll_ctl is private and I can't use it. So either deprecation message should talk about individual commands or Epoll::epoll_ctl should be public. Probably the former.

SteveLauC commented 2 weeks ago

Thanks for catching it! It is indeed confusing.

Probably the former

Yeah, we should use the corresponding methods of Epoll: https://docs.rs/nix/latest/nix/sys/epoll/struct.Epoll.html#method.add