fix clippy errors

This commit is contained in:
Connor Peet 2022-10-17 14:35:20 -07:00
parent b987cb47f4
commit 1b17ff429b
No known key found for this signature in database
GPG key ID: CF8FD2EA0DBC61BD
2 changed files with 7 additions and 9 deletions

View file

@ -239,7 +239,7 @@ pub enum AnyCodeServer {
pub enum CodeServerOrigin {
/// A new code server, that opens the barrier when it exits.
New(Child),
New(Box<Child>),
/// An existing code server with a PID.
Existing(u32),
}
@ -687,7 +687,7 @@ where
}
});
let origin = CodeServerOrigin::New(child);
let origin = CodeServerOrigin::New(Box::new(child));
(origin, listen_rx)
}

View file

@ -39,13 +39,11 @@ fn should_skip_first_segment(file: &fs::File) -> Result<bool, WrappedError> {
};
let mut had_multiple = false;
for file in entries {
if let Ok(file) = file {
had_multiple = true;
if let Ok(name) = file.path() {
if name.iter().next() != Some(&first_name) {
return Ok(false);
}
for file in entries.flatten() {
had_multiple = true;
if let Ok(name) = file.path() {
if name.iter().next() != Some(&first_name) {
return Ok(false);
}
}
}