File tree Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Expand file tree Collapse file tree 3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6
6
## [ Unreleased] - ReleaseDate
7
7
### Added
8
8
9
+ - Implemented ` Default ` for ` FdSet `
10
+ ([ #1107 ] ( https://github.com/nix-rust/nix/pull/1107 ) )
11
+
9
12
- Added ` NixPath::is_empty ` .
10
13
([ #1107 ] ( https://github.com/nix-rust/nix/pull/1107 ) )
11
14
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ impl FdSet {
69
69
}
70
70
}
71
71
72
+ impl Default for FdSet {
73
+ fn default ( ) -> Self {
74
+ Self :: new ( )
75
+ }
76
+ }
77
+
72
78
/// Monitors file descriptors for readiness
73
79
///
74
80
/// Returns the total number of ready file descriptors in all sets. The sets are changed so that all
Original file line number Diff line number Diff line change @@ -344,6 +344,8 @@ impl<T> CmsgSpace<T> {
344
344
/// Create a CmsgSpace<T>. The structure is used only for space, so
345
345
/// the fields are uninitialized.
346
346
#[ deprecated( since="0.14.0" , note="Use the cmsg_space! macro instead" ) ]
347
+ // It's deprecated anyway; no sense adding Default
348
+ #[ allow( clippy:: new_without_default) ]
347
349
pub fn new ( ) -> Self {
348
350
// Safe because the fields themselves aren't accessible.
349
351
unsafe { mem:: uninitialized ( ) }
You can’t perform that action at this time.
0 commit comments