rank possible commands by input similarity

This commit is contained in:
dusk 2025-10-07 18:22:04 +00:00
parent f14901a4e3
commit c1ed7487d7
No known key found for this signature in database
5 changed files with 135 additions and 11 deletions

View file

@ -72,6 +72,20 @@ impl Command {
}
}
impl PartialEq for Command {
fn eq(&self, other: &Self) -> bool {
self.cb == other.cb
}
}
impl Eq for Command {}
impl std::hash::Hash for Command {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.cb.hash(state);
}
}
impl Display for Command {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let visible_flags = self