refactor(backend): alternative approach for sqlx ^0.7 upgrade (#1884)

related to
* https://github.com/launchbadge/sqlx/pull/2617#issuecomment-1636808249
  * https://github.com/launchbadge/sqlx/pull/2617#issuecomment-1637005378
This commit is contained in:
Jakub Kołodziejczak
2023-07-16 10:12:50 +02:00
committed by GitHub
parent 72d0d8a7f5
commit fa0fc7a4e2

View File

@@ -57,7 +57,6 @@ pub struct ScriptHash(pub i64);
#[derive(PartialEq)]
#[cfg_attr(feature = "sqlx", derive(sqlx::Type))]
#[cfg_attr(feature = "sqlx", sqlx(transparent, no_pg_array))]
pub struct ScriptHashes(pub Vec<i64>);
impl Display for ScriptHash {
@@ -91,7 +90,7 @@ impl Serialize for ScriptHashes {
{
let mut seq = serializer.serialize_seq(Some(self.0.len()))?;
for element in &self.0 {
seq.serialize_element(&ScriptHash(*element))?;
seq.serialize_element(element)?;
}
seq.end()
}