Fix clippy warnings (#4176)

This commit is contained in:
JT
2021-12-03 07:05:38 +13:00
committed by GitHub
parent c00853a473
commit c08e145501
12 changed files with 277 additions and 264 deletions

View File

@ -33,7 +33,7 @@ pub struct NuError {
pub output: Option<Outcome>,
}
#[derive(Clone, Debug)]
#[derive(Clone, Debug, Default)]
pub struct NuProcess {
pub arguments: Vec<OsString>,
pub environment_vars: Vec<EnvironmentVariable>,
@ -52,16 +52,6 @@ impl fmt::Display for NuProcess {
}
}
impl Default for NuProcess {
fn default() -> Self {
Self {
arguments: vec![],
environment_vars: Vec::default(),
cwd: None,
}
}
}
impl NuProcess {
pub fn arg<T: AsRef<OsStr>>(&mut self, arg: T) -> &mut Self {
self.arguments.push(arg.as_ref().to_os_string());