Skip to content

Commit 934d394

Browse files
committed
Relax lifetime requirements for PollFd::new
Fixes #2118
1 parent b869424 commit 934d394

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](https://semver.org/).
55

6+
## [Unreleased] - ReleaseDate
7+
8+
### Fixed
9+
10+
- Relaxed lifetime requirements for `PollFd::new`.
11+
([#2134](https://github.com/nix-rust/nix/pull/2134))
12+
613
## [0.27.1] - 2023-08-28
714

815
### Fixed

src/poll.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ impl<'fd> PollFd<'fd> {
3636
//
3737
// // Do something with `pollfd`, which uses the CLOSED fd.
3838
// ```
39-
pub fn new<Fd: AsFd>(fd: &'fd Fd, events: PollFlags) -> PollFd<'fd> {
39+
pub fn new<Fd: AsFd + 'fd>(fd: &Fd, events: PollFlags) -> PollFd<'fd> {
4040
PollFd {
4141
pollfd: libc::pollfd {
4242
fd: fd.as_fd().as_raw_fd(),

0 commit comments

Comments
 (0)