diff options
Diffstat (limited to 'atuin-client/src/history.rs')
| -rw-r--r-- | atuin-client/src/history.rs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/atuin-client/src/history.rs b/atuin-client/src/history.rs index 92e92ddf..111e463a 100644 --- a/atuin-client/src/history.rs +++ b/atuin-client/src/history.rs @@ -1,12 +1,11 @@ use std::env; -use std::hash::{Hash, Hasher}; use chrono::Utc; use atuin_common::utils::uuid_v4; // Any new fields MUST be Optional<>! -#[derive(Debug, Clone, Serialize, Deserialize, Ord, PartialOrd, sqlx::FromRow)] +#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, sqlx::FromRow)] pub struct History { pub id: String, pub timestamp: chrono::DateTime<Utc>, @@ -46,21 +45,3 @@ impl History { } } } - -impl PartialEq for History { - // for the sakes of listing unique history only, we do not care about - // anything else - // obviously this does not refer to the *same* item of history, but when - // we only render the command, it looks the same - fn eq(&self, other: &Self) -> bool { - self.command == other.command - } -} - -impl Eq for History {} - -impl Hash for History { - fn hash<H: Hasher>(&self, state: &mut H) { - self.command.hash(state); - } -} |
