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/import/bash.rs | |
| 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/import/bash.rs')
| -rw-r--r-- | crates/atuin-client/src/import/bash.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/crates/atuin-client/src/import/bash.rs b/crates/atuin-client/src/import/bash.rs index ade1f751..93d1fcf5 100644 --- a/crates/atuin-client/src/import/bash.rs +++ b/crates/atuin-client/src/import/bash.rs @@ -2,11 +2,11 @@ use std::{path::PathBuf, str}; use async_trait::async_trait; use directories::UserDirs; -use eyre::{eyre, Result}; +use eyre::{Result, eyre}; use itertools::Itertools; use time::{Duration, OffsetDateTime}; -use super::{get_histpath, unix_byte_lines, Importer, Loader}; +use super::{Importer, Loader, get_histpath, unix_byte_lines}; use crate::history::History; use crate::import::read_to_end; @@ -73,7 +73,9 @@ impl Importer for Bash { LineType::Empty => {} // do nothing LineType::Timestamp(t) => { if t < next_timestamp { - warn!("Time reversal detected in Bash history! Commands may be ordered incorrectly."); + warn!( + "Time reversal detected in Bash history! Commands may be ordered incorrectly." + ); } next_timestamp = t; } @@ -126,9 +128,9 @@ fn try_parse_line_as_timestamp(line: &str) -> Option<OffsetDateTime> { mod test { use std::cmp::Ordering; - use itertools::{assert_equal, Itertools}; + use itertools::{Itertools, assert_equal}; - use crate::import::{tests::TestLoader, Importer}; + use crate::import::{Importer, tests::TestLoader}; use super::Bash; |
