diff --git a/crates/packager/src/config/mod.rs b/crates/packager/src/config/mod.rs index 003fb906..48451ebb 100644 --- a/crates/packager/src/config/mod.rs +++ b/crates/packager/src/config/mod.rs @@ -227,8 +227,9 @@ impl DebianConfig { I: IntoIterator, S: Into, { - self.depends - .replace(Dependencies::List(depends.into_iter().map(Into::into).collect())); + self.depends.replace(Dependencies::List( + depends.into_iter().map(Into::into).collect(), + )); self } @@ -236,10 +237,9 @@ impl DebianConfig { /// which must contain one dependency (a package name) per line. pub fn depends_path

(mut self, path: P) -> Self where - P: Into + P: Into, { - self.depends - .replace(Dependencies::Path(path.into())); + self.depends.replace(Dependencies::Path(path.into())); self } @@ -299,7 +299,6 @@ impl DebianConfig { } } - /// A list of dependencies specified as either a list of Strings /// or as a path to a file that lists the dependencies, one per line. #[derive(Debug, Clone, Deserialize, Serialize)] @@ -500,8 +499,9 @@ impl PacmanConfig { I: IntoIterator, S: Into, { - self.depends - .replace(Dependencies::List(depends.into_iter().map(Into::into).collect())); + self.depends.replace(Dependencies::List( + depends.into_iter().map(Into::into).collect(), + )); self } @@ -509,10 +509,9 @@ impl PacmanConfig { /// which must contain one dependency (a package name) per line. pub fn depends_path

(mut self, path: P) -> Self where - P: Into + P: Into, { - self.depends - .replace(Dependencies::Path(path.into())); + self.depends.replace(Dependencies::Path(path.into())); self } diff --git a/crates/packager/src/package/deb/mod.rs b/crates/packager/src/package/deb/mod.rs index 641b9a08..3e12e7c1 100644 --- a/crates/packager/src/package/deb/mod.rs +++ b/crates/packager/src/package/deb/mod.rs @@ -280,15 +280,12 @@ fn generate_control_file( if let Some(homepage) = &config.homepage { writeln!(file, "Homepage: {}", homepage)?; } - if let Some(depends) = config - .deb() - .and_then(|d| d.depends.as_ref()) - { + if let Some(depends) = config.deb().and_then(|d| d.depends.as_ref()) { let dependencies = depends.to_list()?; if !dependencies.is_empty() { writeln!(file, "Depends: {}", dependencies.join(", "))?; } - } + } writeln!( file,