From fc45338bbae8550d80d1b94a657e467b7b51c640 Mon Sep 17 00:00:00 2001 From: Gabriel Lopes Veiga Date: Thu, 24 Oct 2024 23:11:11 -0300 Subject: [PATCH] Derive Copy where possible For database-specific types. --- sqlx-postgres/src/types/interval.rs | 2 +- sqlx-postgres/src/types/range.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sqlx-postgres/src/types/interval.rs b/sqlx-postgres/src/types/interval.rs index 52ab549915..02b1faa67a 100644 --- a/sqlx-postgres/src/types/interval.rs +++ b/sqlx-postgres/src/types/interval.rs @@ -10,7 +10,7 @@ use crate::{PgArgumentBuffer, PgHasArrayType, PgTypeInfo, PgValueFormat, PgValue // `PgInterval` is available for direct access to the INTERVAL type -#[derive(Debug, Eq, PartialEq, Clone, Hash, Default)] +#[derive(Debug, Eq, PartialEq, Clone, Copy, Hash, Default)] pub struct PgInterval { pub months: i32, pub days: i32, diff --git a/sqlx-postgres/src/types/range.rs b/sqlx-postgres/src/types/range.rs index 5e1346d86c..0d9c14bdfd 100644 --- a/sqlx-postgres/src/types/range.rs +++ b/sqlx-postgres/src/types/range.rs @@ -26,7 +26,7 @@ bitflags! { } } -#[derive(Debug, PartialEq, Eq, Clone)] +#[derive(Debug, PartialEq, Eq, Clone, Copy)] pub struct PgRange { pub start: Bound, pub end: Bound,