implement parse list options and related commands

This commit is contained in:
dusk 2025-09-30 18:45:35 +00:00
parent 3e7898e5cc
commit 95fc7e9f60
No known key found for this signature in database
18 changed files with 367 additions and 199 deletions

View file

@ -1,4 +1,4 @@
use std::fmt::Display;
use std::{fmt::Display, hash::Hash};
use smol_str::SmolStr;
@ -28,6 +28,20 @@ impl Display for Flag {
}
}
impl PartialEq for Flag {
fn eq(&self, other: &Self) -> bool {
self.name.eq(&other.name)
}
}
impl Eq for Flag {}
impl Hash for Flag {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.name.hash(state);
}
}
#[derive(Debug)]
pub enum FlagMatchError {
ValueMatchFailed(FlagValueMatchError),