mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-06 22:07:55 +00:00
rank possible commands by input similarity
This commit is contained in:
parent
f14901a4e3
commit
c1ed7487d7
5 changed files with 135 additions and 11 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue