File tree 2 files changed +10
-3
lines changed 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 3
3
All notable changes to this project will be documented in this file.
4
4
This project adheres to [ Semantic Versioning] ( https://semver.org/ ) .
5
5
6
+ ## [ Unreleased] - ReleaseDate
7
+
8
+ ### Fixed
9
+
10
+ - Relaxed lifetime requirements for ` FdSet::{insert, remove, contains} ` .
11
+ ([ #2135 ] ( https://github.com/nix-rust/nix/pull/2135 ) )
12
+
6
13
## [ 0.27.1] - 2023-08-28
7
14
8
15
### Fixed
Original file line number Diff line number Diff line change @@ -41,19 +41,19 @@ impl<'fd> FdSet<'fd> {
41
41
}
42
42
43
43
/// Add a file descriptor to an `FdSet`
44
- pub fn insert < Fd : AsFd > ( & mut self , fd : & ' fd Fd ) {
44
+ pub fn insert < Fd : AsFd + ' fd > ( & mut self , fd : Fd ) {
45
45
assert_fd_valid ( fd. as_fd ( ) . as_raw_fd ( ) ) ;
46
46
unsafe { libc:: FD_SET ( fd. as_fd ( ) . as_raw_fd ( ) , & mut self . set ) } ;
47
47
}
48
48
49
49
/// Remove a file descriptor from an `FdSet`
50
- pub fn remove < Fd : AsFd > ( & mut self , fd : & ' fd Fd ) {
50
+ pub fn remove < Fd : AsFd + ' fd > ( & mut self , fd : Fd ) {
51
51
assert_fd_valid ( fd. as_fd ( ) . as_raw_fd ( ) ) ;
52
52
unsafe { libc:: FD_CLR ( fd. as_fd ( ) . as_raw_fd ( ) , & mut self . set ) } ;
53
53
}
54
54
55
55
/// Test an `FdSet` for the presence of a certain file descriptor.
56
- pub fn contains < Fd : AsFd > ( & self , fd : & ' fd Fd ) -> bool {
56
+ pub fn contains < Fd : AsFd + ' fd > ( & self , fd : Fd ) -> bool {
57
57
assert_fd_valid ( fd. as_fd ( ) . as_raw_fd ( ) ) ;
58
58
unsafe { libc:: FD_ISSET ( fd. as_fd ( ) . as_raw_fd ( ) , & self . set ) }
59
59
}
You can’t perform that action at this time.
0 commit comments