Skip to content

Commit c8b0302

Browse files
committed
Fix
1 parent 2748dd0 commit c8b0302

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

sea-query-postgres/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl ToSql for PostgresValue {
104104
#[cfg(feature = "with-bigdecimal")]
105105
Value::BigDecimal(v) => {
106106
use bigdecimal::ToPrimitive;
107-
v.as_deref()
107+
v.as_ref()
108108
.map(|v| v.to_f64().expect("Fail to convert bigdecimal as f64"))
109109
.to_sql(ty, out)
110110
}

sea-query-sqlx/src/sqlx_mysql.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ impl sqlx::IntoArguments<'_, sqlx::mysql::MySql> for SqlxValues {
100100
}
101101
#[cfg(feature = "with-bigdecimal")]
102102
Value::BigDecimal(d) => {
103-
let _ = args.add(d.as_deref());
103+
let _ = args.add(d.as_ref());
104104
}
105105
#[cfg(feature = "with-json")]
106106
Value::Json(j) => {

sea-query-sqlx/src/sqlx_postgres.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ impl sqlx::IntoArguments<'_, sqlx::postgres::Postgres> for SqlxValues {
115115
}
116116
#[cfg(feature = "with-bigdecimal")]
117117
Value::BigDecimal(d) => {
118-
let _ = args.add(d.as_deref());
118+
let _ = args.add(d.as_ref());
119119
}
120120
#[cfg(feature = "with-json")]
121121
Value::Json(j) => {

src/value.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ type_to_value!(Vec<u8>, Bytes, VarBinary(StringLen::None));
813813
type_to_value!(String, String, String(StringLen::None));
814814

815815
#[cfg(any(feature = "with-bigdecimal", feature = "with-jiff"))]
816+
#[allow(unused)]
816817
macro_rules! type_to_box_value {
817818
( $type: ty, $name: ident, $col_type: expr ) => {
818819
impl From<$type> for Value {
@@ -852,4 +853,5 @@ macro_rules! type_to_box_value {
852853
}
853854

854855
#[cfg(any(feature = "with-bigdecimal", feature = "with-jiff"))]
856+
#[allow(unused)]
855857
use type_to_box_value;

0 commit comments

Comments
 (0)