diff --git a/sea-query-binder/src/sqlx_any.rs b/sea-query-binder/src/sqlx_any.rs index 1f601924..7c3dd277 100644 --- a/sea-query-binder/src/sqlx_any.rs +++ b/sea-query-binder/src/sqlx_any.rs @@ -8,86 +8,86 @@ impl<'q> sqlx::IntoArguments<'q, sqlx::any::Any> for SqlxValues { use sqlx::Arguments; match arg { Value::Bool(b) => { - args.add(b); + let _ = args.add(b); } Value::TinyInt(i) => { - args.add(i.map(Into::::into)); + let _ = args.add(i.map(Into::::into)); } Value::SmallInt(i) => { - args.add(i.map(Into::::into)); + let _ = args.add(i.map(Into::::into)); } Value::Int(i) => { - args.add(i); + let _ = args.add(i); } Value::BigInt(i) => { - args.add(i); + let _ = args.add(i); } Value::TinyUnsigned(i) => { - args.add(i.map(Into::::into)); + let _ = args.add(i.map(Into::::into)); } Value::SmallUnsigned(i) => { - args.add(i.map(Into::::into)); + let _ = args.add(i.map(Into::::into)); } Value::Unsigned(i) => { - args.add(i.map(Into::::into)); + let _ = args.add(i.map(Into::::into)); } Value::BigUnsigned(i) => { - args.add(i.map(|i| >::try_from(i).unwrap())); + let _ = args.add(i.map(|i| >::try_from(i).unwrap())); } Value::Float(f) => { - args.add(f); + let _ = args.add(f); } Value::Double(d) => { - args.add(d); + let _ = args.add(d); } Value::String(s) => { - args.add(s.map(|s| *s)); + let _ = args.add(s.map(|s| *s)); } Value::Char(c) => { - args.add(c.map(|c| c.to_string())); + let _ = args.add(c.map(|c| c.to_string())); } Value::Bytes(b) => { - args.add(b.map(|b| *b)); + let _ = args.add(b.map(|b| *b)); } #[cfg(feature = "with-chrono")] Value::ChronoDate(t) => { - args.add(Value::ChronoDate(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoDate(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-chrono")] Value::ChronoTime(t) => { - args.add(Value::ChronoTime(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoTime(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTime(t) => { - args.add(Value::ChronoDateTime(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoDateTime(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeUtc(t) => { - args.add(Value::ChronoDateTimeUtc(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoDateTimeUtc(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeLocal(t) => { - args.add(Value::ChronoDateTimeLocal(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoDateTimeLocal(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeWithTimeZone(t) => { - args.add(Value::ChronoDateTimeWithTimeZone(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoDateTimeWithTimeZone(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-time")] Value::TimeDate(t) => { - args.add(Value::TimeDate(t).time_as_naive_utc_in_string()); + let _ = args.add(Value::TimeDate(t).time_as_naive_utc_in_string()); } #[cfg(feature = "with-time")] Value::TimeTime(t) => { - args.add(Value::TimeTime(t).time_as_naive_utc_in_string()); + let _ = args.add(Value::TimeTime(t).time_as_naive_utc_in_string()); } #[cfg(feature = "with-time")] Value::TimeDateTime(t) => { - args.add(Value::TimeDateTime(t).time_as_naive_utc_in_string()); + let _ = args.add(Value::TimeDateTime(t).time_as_naive_utc_in_string()); } #[cfg(feature = "with-time")] Value::TimeDateTimeWithTimeZone(t) => { - args.add(Value::TimeDateTimeWithTimeZone(t).time_as_naive_utc_in_string()); + let _ = args.add(Value::TimeDateTimeWithTimeZone(t).time_as_naive_utc_in_string()); } #[cfg(feature = "with-uuid")] Value::Uuid(_) => { diff --git a/sea-query-binder/src/sqlx_mysql.rs b/sea-query-binder/src/sqlx_mysql.rs index abeac386..ba9eddb6 100644 --- a/sea-query-binder/src/sqlx_mysql.rs +++ b/sea-query-binder/src/sqlx_mysql.rs @@ -8,102 +8,102 @@ impl sqlx::IntoArguments<'_, sqlx::mysql::MySql> for SqlxValues { use sqlx::Arguments; match arg { Value::Bool(b) => { - args.add(b); + let _ = args.add(b); } Value::TinyInt(i) => { - args.add(i); + let _ = args.add(i); } Value::SmallInt(i) => { - args.add(i); + let _ = args.add(i); } Value::Int(i) => { - args.add(i); + let _ = args.add(i); } Value::BigInt(i) => { - args.add(i); + let _ = args.add(i); } Value::TinyUnsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::SmallUnsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::Unsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::BigUnsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::Float(f) => { - args.add(f); + let _ = args.add(f); } Value::Double(d) => { - args.add(d); + let _ = args.add(d); } Value::String(s) => { - args.add(s.as_deref()); + let _ = args.add(s.as_deref()); } Value::Char(c) => { - args.add(c.map(|c| c.to_string())); + let _ = args.add(c.map(|c| c.to_string())); } Value::Bytes(b) => { - args.add(b.as_deref()); + let _ = args.add(b.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDate(d) => { - args.add(d.as_deref()); + let _ = args.add(d.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeUtc(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeLocal(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeWithTimeZone(t) => { - args.add(Value::ChronoDateTimeWithTimeZone(t).chrono_as_naive_utc_in_string()); + let _ = args.add(Value::ChronoDateTimeWithTimeZone(t).chrono_as_naive_utc_in_string()); } #[cfg(feature = "with-time")] Value::TimeDate(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeDateTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeDateTimeWithTimeZone(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-uuid")] Value::Uuid(uuid) => { - args.add(uuid.as_deref()); + let _ = args.add(uuid.as_deref()); } #[cfg(feature = "with-rust_decimal")] Value::Decimal(d) => { - args.add(d.as_deref()); + let _ = args.add(d.as_deref()); } #[cfg(feature = "with-bigdecimal")] Value::BigDecimal(d) => { - args.add(d.as_deref()); + let _ = args.add(d.as_deref()); } #[cfg(feature = "with-json")] Value::Json(j) => { - args.add(j.as_deref()); + let _ = args.add(j.as_deref()); } #[cfg(feature = "postgres-array")] Value::Array(_, _) => { diff --git a/sea-query-binder/src/sqlx_postgres.rs b/sea-query-binder/src/sqlx_postgres.rs index b0fce77a..12c4e70b 100644 --- a/sea-query-binder/src/sqlx_postgres.rs +++ b/sea-query-binder/src/sqlx_postgres.rs @@ -24,158 +24,158 @@ impl sqlx::IntoArguments<'_, sqlx::postgres::Postgres> for SqlxValues { use sqlx::Arguments; match arg { Value::Bool(b) => { - args.add(b); + let _ = args.add(b); } Value::TinyInt(i) => { - args.add(i); + let _ = args.add(i); } Value::SmallInt(i) => { - args.add(i); + let _ = args.add(i); } Value::Int(i) => { - args.add(i); + let _ = args.add(i); } Value::BigInt(i) => { - args.add(i); + let _ = args.add(i); } Value::TinyUnsigned(i) => { - args.add(i.map(|i| i as i16)); + let _ = args.add(i.map(|i| i as i16)); } Value::SmallUnsigned(i) => { - args.add(i.map(|i| i as i32)); + let _ = args.add(i.map(|i| i as i32)); } Value::Unsigned(i) => { - args.add(i.map(|i| i as i64)); + let _ = args.add(i.map(|i| i as i64)); } Value::BigUnsigned(i) => { - args.add(i.map(|i| >::try_from(i).unwrap())); + let _ = args.add(i.map(|i| >::try_from(i).unwrap())); } Value::Float(f) => { - args.add(f); + let _ = args.add(f); } Value::Double(d) => { - args.add(d); + let _ = args.add(d); } Value::String(s) => { - args.add(s.as_deref()); + let _ = args.add(s.as_deref()); } Value::Char(c) => { - args.add(c.map(|c| c.to_string())); + let _ = args.add(c.map(|c| c.to_string())); } Value::Bytes(b) => { - args.add(b.as_deref()); + let _ = args.add(b.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDate(d) => { - args.add(d.as_deref()); + let _ = args.add(d.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeUtc(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeLocal(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeWithTimeZone(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeDate(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeDateTime(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-time")] Value::TimeDateTimeWithTimeZone(t) => { - args.add(t.as_deref()); + let _ = args.add(t.as_deref()); } #[cfg(feature = "with-uuid")] Value::Uuid(uuid) => { - args.add(uuid.as_deref()); + let _ = args.add(uuid.as_deref()); } #[cfg(feature = "with-rust_decimal")] Value::Decimal(d) => { - args.add(d.as_deref()); + let _ = args.add(d.as_deref()); } #[cfg(feature = "with-bigdecimal")] Value::BigDecimal(d) => { - args.add(d.as_deref()); + let _ = args.add(d.as_deref()); } #[cfg(feature = "with-json")] Value::Json(j) => { - args.add(j.as_deref()); + let _ = args.add(j.as_deref()); } #[cfg(feature = "with-ipnetwork")] Value::IpNetwork(ip) => { - args.add(ip.as_deref()); + let _ = args.add(ip.as_deref()); } #[cfg(feature = "with-mac_address")] Value::MacAddress(mac) => { - args.add(mac.as_deref()); + let _ = args.add(mac.as_deref()); } #[cfg(feature = "postgres-array")] Value::Array(ty, v) => match ty { ArrayType::Bool => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Bool"); - args.add(value) + let _ = args.add(value); } ArrayType::TinyInt => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::TinyInt"); - args.add(value) + let _ = args.add(value); } ArrayType::SmallInt => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::SmallInt"); - args.add(value) + let _ = args.add(value); } ArrayType::Int => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Int"); - args.add(value) + let _ = args.add(value); } ArrayType::BigInt => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::BigInt"); - args.add(value) + let _ = args.add(value); } ArrayType::TinyUnsigned => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::TinyUnsigned"); let value: Option> = value.map(|vec| vec.into_iter().map(|i| i as i16).collect()); - args.add(value) + let _ = args.add(value); } ArrayType::SmallUnsigned => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::SmallUnsigned"); let value: Option> = value.map(|vec| vec.into_iter().map(|i| i as i32).collect()); - args.add(value) + let _ = args.add(value); } ArrayType::Unsigned => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Unsigned"); let value: Option> = value.map(|vec| vec.into_iter().map(|i| i as i64).collect()); - args.add(value) + let _ = args.add(value); } ArrayType::BigUnsigned => { let value: Option> = Value::Array(ty, v) @@ -185,133 +185,133 @@ impl sqlx::IntoArguments<'_, sqlx::postgres::Postgres> for SqlxValues { .map(|i| >::try_from(i).unwrap()) .collect() }); - args.add(value) + let _ = args.add(value); } ArrayType::Float => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Float"); - args.add(value) + let _ = args.add(value); } ArrayType::Double => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Double"); - args.add(value) + let _ = args.add(value); } ArrayType::String => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::String"); - args.add(value) + let _ = args.add(value); } ArrayType::Char => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Char"); let value: Option> = value.map(|vec| vec.into_iter().map(|c| c.to_string()).collect()); - args.add(value) + let _ = args.add(value); } ArrayType::Bytes => { let value: Option>> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Bytes"); - args.add(value) + let _ = args.add(value); } #[cfg(feature = "with-chrono")] ArrayType::ChronoDate => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::ChronoDate"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-chrono")] ArrayType::ChronoTime => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::ChronoTime"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-chrono")] ArrayType::ChronoDateTime => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::ChronoDateTime"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-chrono")] ArrayType::ChronoDateTimeUtc => { let value: Option>> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::ChronoDateTimeUtc"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-chrono")] ArrayType::ChronoDateTimeLocal => { let value: Option>> = Value::Array(ty, v).expect( "This Value::Array should consist of Value::ChronoDateTimeLocal", ); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-chrono")] ArrayType::ChronoDateTimeWithTimeZone => { let value: Option>> = Value::Array(ty, v).expect( "This Value::Array should consist of Value::ChronoDateTimeWithTimeZone", ); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-time")] ArrayType::TimeDate => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::TimeDate"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-time")] ArrayType::TimeTime => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::TimeTime"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-time")] ArrayType::TimeDateTime => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::TimeDateTime"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-time")] ArrayType::TimeDateTimeWithTimeZone => { let value: Option> = Value::Array(ty, v).expect( "This Value::Array should consist of Value::TimeDateTimeWithTimeZone", ); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-uuid")] ArrayType::Uuid => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Uuid"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-rust_decimal")] ArrayType::Decimal => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Decimal"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-bigdecimal")] ArrayType::BigDecimal => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::BigDecimal"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-json")] ArrayType::Json => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::Json"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-ipnetwork")] ArrayType::IpNetwork => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::IpNetwork"); - args.add(value); + let _ = args.add(value); } #[cfg(feature = "with-mac_address")] ArrayType::MacAddress => { let value: Option> = Value::Array(ty, v) .expect("This Value::Array should consist of Value::MacAddress"); - args.add(value); + let _ = args.add(value); } }, } diff --git a/sea-query-binder/src/sqlx_sqlite.rs b/sea-query-binder/src/sqlx_sqlite.rs index 1865ba6f..9be0af0b 100644 --- a/sea-query-binder/src/sqlx_sqlite.rs +++ b/sea-query-binder/src/sqlx_sqlite.rs @@ -8,104 +8,104 @@ impl<'q> sqlx::IntoArguments<'q, sqlx::sqlite::Sqlite> for SqlxValues { use sqlx::Arguments; match arg { Value::Bool(b) => { - args.add(b); + let _ = args.add(b); } Value::TinyInt(i) => { - args.add(i); + let _ = args.add(i); } Value::SmallInt(i) => { - args.add(i); + let _ = args.add(i); } Value::Int(i) => { - args.add(i); + let _ = args.add(i); } Value::BigInt(i) => { - args.add(i); + let _ = args.add(i); } Value::TinyUnsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::SmallUnsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::Unsigned(i) => { - args.add(i); + let _ = args.add(i); } Value::BigUnsigned(i) => { - args.add(i.map(|i| >::try_from(i).unwrap())); + let _ = args.add(i.map(|i| >::try_from(i).unwrap())); } Value::Float(f) => { - args.add(f); + let _ = args.add(f); } Value::Double(d) => { - args.add(d); + let _ = args.add(d); } Value::String(s) => { - args.add(s.map(|s| *s)); + let _ = args.add(s.map(|s| *s)); } Value::Char(c) => { - args.add(c.map(|c| c.to_string())); + let _ = args.add(c.map(|c| c.to_string())); } Value::Bytes(b) => { - args.add(b.map(|b| *b)); + let _ = args.add(b.map(|b| *b)); } #[cfg(feature = "with-chrono")] Value::ChronoDate(d) => { - args.add(d.map(|d| *d)); + let _ = args.add(d.map(|d| *d)); } #[cfg(feature = "with-chrono")] Value::ChronoTime(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-chrono")] Value::ChronoDateTime(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeUtc(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeLocal(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-chrono")] Value::ChronoDateTimeWithTimeZone(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-time")] Value::TimeDate(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-time")] Value::TimeTime(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-time")] Value::TimeDateTime(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-time")] Value::TimeDateTimeWithTimeZone(t) => { - args.add(t.map(|t| *t)); + let _ = args.add(t.map(|t| *t)); } #[cfg(feature = "with-uuid")] Value::Uuid(uuid) => { - args.add(uuid.map(|uuid| *uuid)); + let _ = args.add(uuid.map(|uuid| *uuid)); } #[cfg(feature = "with-rust_decimal")] Value::Decimal(decimal) => { use rust_decimal::prelude::ToPrimitive; - args.add(decimal.map(|d| d.to_string())); + let _ = args.add(decimal.map(|d| d.to_string())); } #[cfg(feature = "with-bigdecimal")] Value::BigDecimal(big_decimal) => { use bigdecimal::ToPrimitive; - args.add(big_decimal.map(|d| d.to_string())); + let _ = args.add(big_decimal.map(|d| d.to_string())); } #[cfg(feature = "with-json")] Value::Json(j) => { - args.add(j.map(|j| *j)); + let _ = args.add(j.map(|j| *j)); } #[cfg(feature = "with-ipnetwork")] Value::IpNetwork(_) => {