fix a bunch of lints
This commit is contained in:
parent
aed73e99be
commit
420fac5f18
5 changed files with 40 additions and 41 deletions
|
|
@ -52,7 +52,7 @@ impl FdInfo {
|
|||
|
||||
match Self::guess_name(self.fd) {
|
||||
Ok(name) => {
|
||||
let prev = self.name.set(Box::from(name));
|
||||
let prev = self.name.set(name);
|
||||
debug_assert_eq!(prev, Ok(()));
|
||||
},
|
||||
Err(e) => {
|
||||
|
|
@ -105,13 +105,14 @@ impl<'a> Display for FdInfoDisplay<'a> {
|
|||
}
|
||||
|
||||
#[derive(Copy)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash, Default)]
|
||||
#[non_exhaustive]
|
||||
pub enum FdKind {
|
||||
File,
|
||||
Socket,
|
||||
SockStream,
|
||||
Poller,
|
||||
#[default]
|
||||
Unknown,
|
||||
}
|
||||
|
||||
|
|
@ -128,12 +129,6 @@ impl FdKind {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for FdKind {
|
||||
fn default() -> FdKind {
|
||||
FdKind::Unknown
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy)]
|
||||
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
pub struct TokenFd {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue