Skip to content

Commit

Permalink
bump sqlx version
Browse files Browse the repository at this point in the history
  • Loading branch information
philsippl authored and TheButlah committed Oct 11, 2024
1 parent c0c436a commit c626aa0
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 43 deletions.
90 changes: 55 additions & 35 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rayon = "1.8.1"
reqwest = { version = "0.11.24", features = ["json"] }
serde = { version = "1.0.195", features = ["derive"] }
serde_json = "1.0.111"
sqlx = { version = "0.7.3", features = [
sqlx = { version = "0.8", features = [
"runtime-tokio-native-tls",
"any",
"postgres",
Expand Down
1 change: 0 additions & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ version = 2
ignore = [
# https://github.com/mehcode/config-rs/issues/563
{ id = "RUSTSEC-2024-0320", reason = "waiting for `config` crate to remove the dependency" },
{ id = "RUSTSEC-2024-0363", reason = "waiting for https://github.com/worldcoin/mpc-uniqueness-check/pull/131" },
{ id = "RUSTSEC-2024-0357", reason = "openssl UB, we should update to latest crate" }
]

Expand Down
12 changes: 6 additions & 6 deletions src/db/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ where
[u8; BYTES_PER_BITS]: sqlx::Decode<'r, DB>,
{
fn decode(
value: <DB as sqlx::database::HasValueRef<'r>>::ValueRef,
value: <DB as sqlx::database::Database>::ValueRef<'r>,
) -> Result<Self, sqlx::error::BoxDynError> {
let bytes = <[u8; BYTES_PER_BITS] as sqlx::Decode<DB>>::decode(value)?;

Expand All @@ -42,8 +42,8 @@ where
{
fn encode_by_ref(
&self,
buf: &mut <DB as sqlx::database::HasArguments<'q>>::ArgumentBuffer,
) -> sqlx::encode::IsNull {
buf: &mut <DB as sqlx::database::Database>::ArgumentBuffer<'q>,
) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
let mut bytes: [u8; BYTES_PER_BITS] = [0; BYTES_PER_BITS];

for (i, v) in self.0.into_iter().flat_map(u64::to_be_bytes).enumerate()
Expand Down Expand Up @@ -71,7 +71,7 @@ where
[u8; BYTES_PER_ENCODED_BITS]: sqlx::Decode<'r, DB>,
{
fn decode(
value: <DB as sqlx::database::HasValueRef<'r>>::ValueRef,
value: <DB as sqlx::database::Database>::ValueRef<'r>,
) -> Result<Self, sqlx::error::BoxDynError> {
let bytes =
<[u8; BYTES_PER_ENCODED_BITS] as sqlx::Decode<DB>>::decode(value)?;
Expand All @@ -93,8 +93,8 @@ where
{
fn encode_by_ref(
&self,
buf: &mut <DB as sqlx::database::HasArguments<'q>>::ArgumentBuffer,
) -> sqlx::encode::IsNull {
buf: &mut <DB as sqlx::database::Database>::ArgumentBuffer<'q>,
) -> Result<sqlx::encode::IsNull, sqlx::error::BoxDynError> {
let mut bytes: [u8; BYTES_PER_ENCODED_BITS] =
[0; BYTES_PER_ENCODED_BITS];

Expand Down

0 comments on commit c626aa0

Please sign in to comment.