diff options
author | Ellie Huxtable <ellie@elliehuxtable.com> | 2023-04-11 16:26:16 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 16:26:16 +0100 |
commit | 03dd3ddf8b8c0ad254850cd940728c888dd7a80c (patch) | |
tree | 2ebac480115be4b20ad5385362aa9dd988bc9799 /atuin-client/src/import | |
parent | 301296fae53da611c87f87dd886700530d5a00e2 (diff) |
Switch to uuidv7 (#864)
* Add uuid_v7
* Actually use the new uuid
* Add a test to ensure all uuids are unique, even in a tight loop
* Make clippy happy
Diffstat (limited to 'atuin-client/src/import')
-rw-r--r-- | atuin-client/src/import/resh.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/atuin-client/src/import/resh.rs b/atuin-client/src/import/resh.rs index 41f548360..6fa27b5a8 100644 --- a/atuin-client/src/import/resh.rs +++ b/atuin-client/src/import/resh.rs @@ -6,7 +6,7 @@ use directories::UserDirs; use eyre::{eyre, Result}; use serde::Deserialize; -use atuin_common::utils::uuid_v4; +use atuin_common::utils::uuid_v7; use super::{get_histpath, unix_byte_lines, Importer, Loader}; use crate::history::History; @@ -123,13 +123,13 @@ impl Importer for Resh { }; h.push(History { - id: uuid_v4(), + id: uuid_v7().as_simple().to_string(), timestamp, duration, exit: entry.exit_code, command: entry.cmd_line, cwd: entry.pwd, - session: uuid_v4(), + session: uuid_v7().as_simple().to_string(), hostname: entry.host, deleted_at: None, }) |