diff options
| author | Ellie Huxtable <ellie@atuin.sh> | 2025-03-19 12:44:20 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-19 12:44:20 +0000 |
| commit | 14ec768b4520d4fc34dbf24e663ea7db940c18b7 (patch) | |
| tree | a37db707ab8676cad5b3e6ca47af3f2997958906 /crates/atuin-client/src/history | |
| parent | feat: Use readline binding for ctrl-a when it is not the prefix (#2626) (diff) | |
| download | atuin-14ec768b4520d4fc34dbf24e663ea7db940c18b7.zip | |
chore: migrate to rust 2024 (#2635)
* chore: upgrade to 2024 edition
* ugh unsafe
* format
* nixxxxxxxxxxx why
Diffstat (limited to 'crates/atuin-client/src/history')
| -rw-r--r-- | crates/atuin-client/src/history/store.rs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/crates/atuin-client/src/history/store.rs b/crates/atuin-client/src/history/store.rs index b0341a26..b8ac6ff4 100644 --- a/crates/atuin-client/src/history/store.rs +++ b/crates/atuin-client/src/history/store.rs @@ -1,16 +1,16 @@ use std::{collections::HashSet, fmt::Write, time::Duration}; -use eyre::{bail, eyre, Result}; +use eyre::{Result, bail, eyre}; use indicatif::{ProgressBar, ProgressState, ProgressStyle}; use rmp::decode::Bytes; use crate::{ - database::{current_context, Database}, + database::{Database, current_context}, record::{encryption::PASETO_V4, sqlite_store::SqliteStore, store::Store}, }; use atuin_common::record::{DecryptedData, Host, HostId, Record, RecordId, RecordIdx}; -use super::{History, HistoryId, HISTORY_TAG, HISTORY_VERSION}; +use super::{HISTORY_TAG, HISTORY_VERSION, History, HistoryId}; #[derive(Debug, Clone)] pub struct HistoryStore { @@ -246,10 +246,11 @@ impl HistoryStore { for id in ids { let record = self.store.get(*id).await; - let record = if let Ok(record) = record { - record - } else { - continue; + let record = match record { + Ok(record) => record, + _ => { + continue; + } }; if record.tag != HISTORY_TAG { @@ -342,7 +343,7 @@ mod tests { use atuin_common::record::DecryptedData; use time::macros::datetime; - use crate::history::{store::HistoryRecord, HISTORY_VERSION}; + use crate::history::{HISTORY_VERSION, store::HistoryRecord}; use super::History; |
