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/encryption.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 '')
| -rw-r--r-- | crates/atuin-client/src/encryption.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/atuin-client/src/encryption.rs b/crates/atuin-client/src/encryption.rs index 02e5e3fb..a1e844e7 100644 --- a/crates/atuin-client/src/encryption.rs +++ b/crates/atuin-client/src/encryption.rs @@ -10,17 +10,17 @@ use std::{io::prelude::*, path::PathBuf}; -use base64::prelude::{Engine, BASE64_STANDARD}; +use base64::prelude::{BASE64_STANDARD, Engine}; pub use crypto_secretbox::Key; use crypto_secretbox::{ - aead::{Nonce, OsRng}, AeadCore, AeadInPlace, KeyInit, XSalsa20Poly1305, + aead::{Nonce, OsRng}, }; -use eyre::{bail, ensure, eyre, Context, Result}; +use eyre::{Context, Result, bail, ensure, eyre}; use fs_err as fs; -use rmp::{decode::Bytes, Marker}; +use rmp::{Marker, decode::Bytes}; use serde::{Deserialize, Serialize}; -use time::{format_description::well_known::Rfc3339, macros::format_description, OffsetDateTime}; +use time::{OffsetDateTime, format_description::well_known::Rfc3339, macros::format_description}; use crate::{history::History, settings::Settings}; @@ -265,9 +265,9 @@ fn error_report<E: std::fmt::Debug>(err: E) -> eyre::Report { #[cfg(test)] mod test { - use crypto_secretbox::{aead::OsRng, KeyInit, XSalsa20Poly1305}; + use crypto_secretbox::{KeyInit, XSalsa20Poly1305, aead::OsRng}; use pretty_assertions::assert_eq; - use time::{macros::datetime, OffsetDateTime}; + use time::{OffsetDateTime, macros::datetime}; use crate::history::History; @@ -392,7 +392,7 @@ mod test { #[test] fn key_encodings() { - use super::{decode_key, encode_key, Key}; + use super::{Key, decode_key, encode_key}; // a history of our key encodings. // v11.0.0 xCAbWypb0msJ2Kq+8j4GVEWUlDX7deKnrTRSIopuqXxc5Q== |
