tackle some minor clippy lints in ptyd and its dependencies

This commit is contained in:
auronandace
2026-06-17 10:41:06 +01:00
parent dab7d039e2
commit 997155ef2c
5 changed files with 6 additions and 4 deletions
+2
View File
@@ -43,6 +43,7 @@ pub struct Daemon {
impl Daemon {
/// Create a new daemon.
#[expect(clippy::new_ret_no_self)]
pub fn new(f: impl FnOnce(Daemon) -> !) -> ! {
let write_pipe = unsafe { io::PipeWriter::from_raw_fd(get_fd("INIT_NOTIFY")) };
@@ -89,6 +90,7 @@ pub struct SchemeDaemon {
impl SchemeDaemon {
/// Create a new daemon for use with schemes.
#[expect(clippy::new_ret_no_self)]
pub fn new(f: impl FnOnce(SchemeDaemon) -> !) -> ! {
let write_pipe = unsafe { io::PipeWriter::from_raw_fd(get_fd("INIT_NOTIFY")) };
+1 -1
View File
@@ -38,7 +38,7 @@ impl Resource for PtyControlTerm {
fn path(&mut self, buf: &mut [u8]) -> Result<usize> {
FpathWriter::with(buf, "pty", |w| {
write!(w, "{}", "ptmx").unwrap();
write!(w, "ptmx").unwrap();
Ok(())
})
}
+1 -1
View File
@@ -75,7 +75,7 @@ fn daemon(daemon: daemon::Daemon) -> ! {
timeout_count = timeout_count.wrapping_add(1);
for (_id, handle) in scheme.handles.iter_mut() {
for handle in scheme.handles.values_mut() {
if let Handle::Resource(res) = handle {
res.timeout(timeout_count);
}
+1 -1
View File
@@ -87,7 +87,7 @@ impl<'sock> Blocking<'sock> {
}) => {
panic!("scheme response writing should always block");
}
Err(err) => return Err(LError::from(err).into()),
Err(err) => Err(LError::from(err).into()),
}
}
+1 -1
View File
@@ -190,7 +190,7 @@ impl<'sock> ReadinessBased<'sock> {
}) => {
panic!("scheme response writing should always block");
}
Err(err) => return Err(LError::from(err).into()),
Err(err) => Err(LError::from(err).into()),
}
}
}