half-finish backend macro

i cannot figure out how procedural macros work actually
This commit is contained in:
steven-omaha
2023-01-12 15:01:04 +01:00
parent 49aa2b67e2
commit 1b4a4d8117
2 changed files with 6 additions and 56 deletions
+6 -15
View File
@@ -23,21 +23,12 @@ pub(crate) use rust::Rust;
register_backends!(Pacman, Rust);
impl Backends {
// fn next(&self) -> Option<Self> {
// match self {
// Self::Pacman => Some(Self::Rust),
// Self::Rust => Some(Self::Pip),
// Self::Pip => None,
// }
// }
// fn get_backend(&self) -> Box<dyn Backend> {
// match self {
// Self::Pacman => Box::new(Pacman::new()),
// Self::Rust => Box::new(Rust::new()),
// _ => todo!(),
// }
// }
fn next(&self) -> Option<Self> {
match self {
Self::Pacman => Some(Self::Rust),
Self::Rust => None,
}
}
}
#[derive(Debug)]