diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 00:54:30 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-06-11 00:54:30 +0200 |
| commit | 5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8 (patch) | |
| tree | c64baa8d5866c8e339eaf660dd3f94f30a3f7d8a /crates/atuin-common/src/lib.rs | |
| parent | chore: Somewhat simplify sync code (diff) | |
| download | atuin-5c39e7cf284a1f6e9a1657f2deb44e359fc47eb8.zip | |
chore: Move everything into one big crate
That helps remove duplicated code and rustc/cargo will now also show
dead code correctly.
Diffstat (limited to 'crates/atuin-common/src/lib.rs')
| -rw-r--r-- | crates/atuin-common/src/lib.rs | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/crates/atuin-common/src/lib.rs b/crates/atuin-common/src/lib.rs deleted file mode 100644 index 91164a82..00000000 --- a/crates/atuin-common/src/lib.rs +++ /dev/null @@ -1,60 +0,0 @@ -#![deny(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<DB: sqlx::Database> sqlx::Type<DB> for $name - where - Uuid: sqlx::Type<DB>, - { - fn type_info() -> <DB as sqlx::Database>::TypeInfo { - Uuid::type_info() - } - } - - impl<'r, DB: sqlx::Database> sqlx::Decode<'r, DB> for $name - where - Uuid: sqlx::Decode<'r, DB>, - { - fn decode( - value: DB::ValueRef<'r>, - ) -> std::result::Result<Self, sqlx::error::BoxDynError> { - 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 DB::ArgumentBuffer<'q>, - ) -> Result<sqlx::encode::IsNull, Box<dyn std::error::Error + Send + Sync + 'static>> - { - self.0.encode_by_ref(buf) - } - } - }; -} - -pub mod api; -pub mod record; -pub mod shell; -pub mod tls; -pub mod utils; |
