add Debug supertrait for Backend

This commit is contained in:
steven-omaha
2023-01-30 14:57:40 +01:00
parent 6270107a69
commit a71a398e57
4 changed files with 5 additions and 1 deletions
+1
View File
@@ -8,6 +8,7 @@ use anyhow::{Context, Result};
use crate::backend::backend_trait::*;
use crate::{impl_backend_constants, Group, Package};
#[derive(Debug)]
pub(crate) struct Pacman {
pub(crate) binary: String,
pub(crate) aur_rm_args: Option<Vec<String>>,
+1
View File
@@ -8,6 +8,7 @@ use serde_json::Value;
use crate::backend::backend_trait::*;
use crate::{impl_backend_constants, Group, Package};
#[derive(Debug)]
pub(crate) struct Rust {
pub(crate) packages: HashSet<Package>,
}
+2 -1
View File
@@ -1,3 +1,4 @@
use std::fmt::Debug;
use std::process::Command;
use std::{collections::HashSet, process::ExitStatus};
@@ -8,7 +9,7 @@ use crate::{Group, Package};
pub(in crate::backend) type Switches = &'static [&'static str];
pub(in crate::backend) type Text = &'static str;
pub(crate) trait Backend {
pub(crate) trait Backend: Debug {
fn get_binary(&self) -> Text;
fn get_section(&self) -> Text;
fn get_switches_install(&self) -> Switches;
+1
View File
@@ -5,6 +5,7 @@ use anyhow::{bail, ensure, Context, Result};
use super::Backend;
use crate::Package;
#[derive(Debug)]
pub(crate) struct ToDoPerBackend(Vec<(Box<dyn Backend>, Vec<Package>)>);
impl ToDoPerBackend {