refact(backend): remove dead code

This commit is contained in:
steven-omaha
2023-03-03 17:58:17 +01:00
parent e164416d33
commit f79fad454c
2 changed files with 0 additions and 21 deletions
@@ -104,18 +104,6 @@ pub trait Backend: Debug {
.with_context(|| format!("running command [{cmd:?}]")) .with_context(|| format!("running command [{cmd:?}]"))
} }
/// TODO remove.
fn extract_packages_from_group_file_content(&self, content: &str) -> HashSet<Package> {
content
.lines()
.skip_while(|line| !line.starts_with(&format!("[{}]", self.get_section())))
.skip(1)
.filter(|line| !line.starts_with('['))
.fuse()
.filter_map(Package::try_from)
.collect()
}
/// Get missing packages, sorted alphabetically. /// Get missing packages, sorted alphabetically.
fn get_missing_packages_sorted(&self) -> Result<Vec<Package>> { fn get_missing_packages_sorted(&self) -> Result<Vec<Package>> {
let installed = self let installed = self
@@ -127,9 +115,6 @@ pub trait Backend: Debug {
Ok(diff) Ok(diff)
} }
/// TODO remove
fn add_packages(&mut self, packages: HashSet<Package>);
/// Show information from package manager for package. /// Show information from package manager for package.
fn show_package_info(&self, package: &Package) -> Result<ExitStatus> { fn show_package_info(&self, package: &Package) -> Result<ExitStatus> {
let mut cmd = Command::new(self.get_binary()); let mut cmd = Command::new(self.get_binary());
-6
View File
@@ -44,12 +44,6 @@ macro_rules! impl_backend_constants {
}) })
} }
fn add_packages(&mut self, packages: HashSet<Package>) {
for p in packages {
self.packages.insert(p);
}
}
fn as_any_mut(&mut self) -> &mut dyn std::any::Any { fn as_any_mut(&mut self) -> &mut dyn std::any::Any {
self self
} }