From 9352a0f7cfdd5f5fc102a25d8a93218bc3dbe462 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sat, 13 Jun 2026 00:58:32 +0200 Subject: chore(treewide): Fix some of `clippy`'s error Just a run of `cargo clippy --fix` --- crates/turtle/src/atuin_client/history.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'crates/turtle/src/atuin_client/history.rs') diff --git a/crates/turtle/src/atuin_client/history.rs b/crates/turtle/src/atuin_client/history.rs index 11d60548..c38d8ccc 100644 --- a/crates/turtle/src/atuin_client/history.rs +++ b/crates/turtle/src/atuin_client/history.rs @@ -223,7 +223,7 @@ impl History { } } - fn deserialize_v0(bytes: &[u8]) -> Result { + fn deserialize_v0(bytes: &[u8]) -> Result { use rmp::decode; fn error_report(err: E) -> eyre::Report { @@ -270,7 +270,7 @@ impl History { bail!("trailing bytes in encoded history. malformed") } - Ok(History { + Ok(Self { id: id.to_owned().into(), timestamp: OffsetDateTime::from_unix_timestamp_nanos(i128::from(timestamp))?, duration, @@ -287,7 +287,7 @@ impl History { }) } - fn deserialize_v1(bytes: &[u8]) -> Result { + fn deserialize_v1(bytes: &[u8]) -> Result { use rmp::decode; fn error_report(err: E) -> eyre::Report { @@ -341,7 +341,7 @@ impl History { bail!("trailing bytes in encoded history. malformed") } - Ok(History { + Ok(Self { id: id.to_owned().into(), timestamp: OffsetDateTime::from_unix_timestamp_nanos(i128::from(timestamp))?, duration, @@ -358,7 +358,7 @@ impl History { }) } - pub(crate) fn deserialize(bytes: &[u8], version: &str) -> Result { + pub(crate) fn deserialize(bytes: &[u8], version: &str) -> Result { match version { HISTORY_VERSION_V0 => Self::deserialize_v0(bytes), HISTORY_VERSION_V1 => Self::deserialize_v1(bytes), -- cgit v1.3.1