From 95cc472037fcb3207b510e67f1a44af4e2a2cae9 Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Thu, 18 Apr 2024 16:41:28 +0100 Subject: chore: move crates into crates/ dir (#1958) I'd like to tidy up the root a little, and it's nice to have all the rust crates in one place --- atuin-common/src/lib.rs | 58 ------------------------------------------------- 1 file changed, 58 deletions(-) delete mode 100644 atuin-common/src/lib.rs (limited to 'atuin-common/src/lib.rs') diff --git a/atuin-common/src/lib.rs b/atuin-common/src/lib.rs deleted file mode 100644 index 2d848f6f..00000000 --- a/atuin-common/src/lib.rs +++ /dev/null @@ -1,58 +0,0 @@ -#![forbid(unsafe_code)] - -/// Defines a new UUID type wrapper -macro_rules! new_uuid { - ($name:ident) => { - #[derive( - Debug, - Copy, - Clone, - PartialEq, - Eq, - Hash, - PartialOrd, - Ord, - serde::Serialize, - serde::Deserialize, - )] - #[serde(transparent)] - pub struct $name(pub Uuid); - - impl sqlx::Type for $name - where - Uuid: sqlx::Type, - { - fn type_info() -> ::TypeInfo { - Uuid::type_info() - } - } - - impl<'r, DB: sqlx::Database> sqlx::Decode<'r, DB> for $name - where - Uuid: sqlx::Decode<'r, DB>, - { - fn decode( - value: >::ValueRef, - ) -> std::result::Result { - Uuid::decode(value).map(Self) - } - } - - impl<'q, DB: sqlx::Database> sqlx::Encode<'q, DB> for $name - where - Uuid: sqlx::Encode<'q, DB>, - { - fn encode_by_ref( - &self, - buf: &mut >::ArgumentBuffer, - ) -> sqlx::encode::IsNull { - self.0.encode_by_ref(buf) - } - } - }; -} - -pub mod api; -pub mod record; -pub mod shell; -pub mod utils; -- cgit v1.3.1