From 48747e3b7c542c696003f71ef4b4ae457934e57c Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Thu, 21 Apr 2022 08:05:57 +0100 Subject: A few minor tweaks (#314) * use bail macro replace client database errors remove dead code * fix test --- atuin-client/src/history.rs | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'atuin-client/src/history.rs') 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, @@ -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(&self, state: &mut H) { - self.command.hash(state); - } -} -- cgit v1.3.1