Skip to content

Commit

Permalink
use diesel
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed May 22, 2024
1 parent 7e93d7b commit 8a6ec7d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/speedy-uuid/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ use std::{
use thiserror::Error;
use uuid_simd::{format_hyphenated, AsciiCase, Out, UuidExt};

#[cfg(feature = "diesel")]
use diesel::{deserialize::FromSqlRow, expression::AsExpression};

pub use uuid;

#[derive(Debug, Error)]
Expand All @@ -17,10 +20,7 @@ pub enum Error {
Uuid(#[from] uuid::Error),
}

#[cfg_attr(
feature = "diesel",
derive(diesel::expression::AsExpression, diesel::deserialize::FromSqlRow)
)]
#[cfg_attr(feature = "diesel", derive(AsExpression, FromSqlRow))]
#[cfg_attr(feature = "diesel", diesel(sql_type = diesel::sql_types::Uuid))]
#[derive(Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)]
#[repr(transparent)]
Expand Down

0 comments on commit 8a6ec7d

Please sign in to comment.