diff options
author | Alan Somers <asomers@gmail.com> | 2021-07-24 16:47:26 -0600 |
---|---|---|
committer | Alan Somers <asomers@gmail.com> | 2021-07-24 18:25:44 -0600 |
commit | 86acc26cbcadfd572d6af93ba34467a3cdac8b4e (patch) | |
tree | e4d378d4a648259bf782262fd90c7a5709d67b77 /src/poll.rs | |
parent | e88a6cf2ec0b6bd042641f58618d6e72e2c624c4 (diff) | |
download | nix-86acc26cbcadfd572d6af93ba34467a3cdac8b4e.zip |
Constify many functions
Constify most functions that can be constified. The exceptions are
mostly accessors for structs that have no const constructor.
Diffstat (limited to 'src/poll.rs')
-rw-r--r-- | src/poll.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/poll.rs b/src/poll.rs index 0c3f208a..e814337a 100644 --- a/src/poll.rs +++ b/src/poll.rs @@ -25,7 +25,7 @@ pub struct PollFd { impl PollFd { /// Creates a new `PollFd` specifying the events of interest /// for a given file descriptor. - pub fn new(fd: RawFd, events: PollFlags) -> PollFd { + pub const fn new(fd: RawFd, events: PollFlags) -> PollFd { PollFd { pollfd: libc::pollfd { fd, |