Skip to content

Commit c853ce7

Browse files
Remove -scylla dependency
1 parent eab11ac commit c853ce7

File tree

5 files changed

+0
-112
lines changed

5 files changed

+0
-112
lines changed

rust/cardano-blockchain-types/src/hashes.rs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -74,29 +74,6 @@ macro_rules! define_hashes {
7474
Ok(Self(hash))
7575
}
7676
}
77-
78-
// TODO: Uncomment when the changes to Blake2bHash are merged.
79-
// impl SerializeValue for $name {
80-
// fn serialize<'b>(
81-
// &self, typ: &ColumnType, writer: CellWriter<'b>,
82-
// ) -> Result<WrittenCellProof<'b>, SerializationError> {
83-
// self.0.serialize(typ, writer)
84-
// }
85-
// }
86-
//
87-
// impl<'frame, 'metadata> DeserializeValue<'frame, 'metadata> for $name
88-
// {
89-
// fn type_check(typ: &ColumnType) -> Result<(), TypeCheckError> {
90-
// <$inner>::type_check(typ)
91-
// }
92-
//
93-
// fn deserialize(
94-
// typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>,
95-
// ) -> Result<Self, DeserializationError> {
96-
// let hash = <$inner>::deserialize(typ, v)?;
97-
// Ok(Self(hash))
98-
// }
99-
// }
10077
)+
10178
};
10279
}

rust/catalyst-types/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ chrono = "0.4.39"
3333
fmmap = { version = "0.3.3", features = ["sync", "tokio-async"] }
3434
once_cell = "1.20.2"
3535
tracing = "0.1.41"
36-
scylla = "0.15.1"
3736

3837
[dev-dependencies]
3938
ed25519-dalek = { version = "2.1.1", features = ["rand_core"] }

rust/catalyst-types/src/hashes.rs

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@ use std::{fmt, str::FromStr};
55
use blake2b_simd::Params;
66
use displaydoc::Display;
77
use pallas_crypto::hash::Hash;
8-
use scylla::_macro_internal::{
9-
CellWriter, ColumnType, DeserializationError, DeserializeValue, FrameSlice, SerializationError,
10-
SerializeValue, TypeCheckError, WrittenCellProof,
11-
};
128
use thiserror::Error;
139

1410
/// Number of bytes in a blake2b 224 hash.
@@ -169,29 +165,6 @@ impl<'a, C, const BYTES: usize> minicbor::Decode<'a, C> for Blake2bHash<BYTES> {
169165
}
170166
}
171167

172-
impl<const BYTES: usize> SerializeValue for Blake2bHash<BYTES> {
173-
fn serialize<'b>(
174-
&self, typ: &ColumnType, writer: CellWriter<'b>,
175-
) -> Result<WrittenCellProof<'b>, SerializationError> {
176-
self.0.as_ref().serialize(typ, writer)
177-
}
178-
}
179-
180-
impl<'frame, 'metadata, const BYTES: usize> DeserializeValue<'frame, 'metadata>
181-
for Blake2bHash<BYTES>
182-
{
183-
fn type_check(typ: &ColumnType) -> Result<(), TypeCheckError> {
184-
<Vec<u8>>::type_check(typ)
185-
}
186-
187-
fn deserialize(
188-
typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>,
189-
) -> Result<Self, DeserializationError> {
190-
let bytes = <Vec<u8>>::deserialize(typ, v)?;
191-
Self::try_from(bytes).map_err(DeserializationError::new)
192-
}
193-
}
194-
195168
#[cfg(test)]
196169
mod tests {
197170
use super::*;

rust/catalyst-types/src/uuid/uuid_v4.rs

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
use std::fmt::{Display, Formatter};
33

44
use minicbor::{Decode, Decoder, Encode};
5-
use scylla::{
6-
_macro_internal::{
7-
CellWriter, ColumnType, DeserializationError, FrameSlice, SerializationError,
8-
SerializeValue, TypeCheckError, WrittenCellProof,
9-
},
10-
deserialize::DeserializeValue,
11-
};
125
use serde::Deserialize;
136
use uuid::Uuid;
147

@@ -114,31 +107,6 @@ impl<'de> serde::Deserialize<'de> for UuidV4 {
114107
}
115108
}
116109

117-
impl SerializeValue for UuidV4 {
118-
fn serialize<'b>(
119-
&self, typ: &ColumnType, writer: CellWriter<'b>,
120-
) -> Result<WrittenCellProof<'b>, SerializationError> {
121-
self.0.serialize(typ, writer)
122-
}
123-
}
124-
125-
impl<'frame, 'metadata> DeserializeValue<'frame, 'metadata> for UuidV4 {
126-
fn type_check(typ: &ColumnType) -> Result<(), TypeCheckError> {
127-
Uuid::type_check(typ)
128-
}
129-
130-
fn deserialize(
131-
typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>,
132-
) -> Result<Self, DeserializationError> {
133-
let uuid = <Uuid as DeserializeValue>::deserialize(typ, v)?;
134-
if is_valid(&uuid) {
135-
Ok(Self(uuid))
136-
} else {
137-
Err(DeserializationError::new(UuidError::InvalidUuidV4(uuid)))
138-
}
139-
}
140-
}
141-
142110
#[cfg(test)]
143111
mod tests {
144112
use super::*;

rust/catalyst-types/src/uuid/uuid_v7.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
use std::fmt::{Display, Formatter};
33

44
use minicbor::{Decode, Decoder, Encode};
5-
use scylla::_macro_internal::{
6-
CellWriter, ColumnType, DeserializationError, DeserializeValue, FrameSlice, SerializationError,
7-
SerializeValue, TypeCheckError, WrittenCellProof,
8-
};
95
use serde::Deserialize;
106
use uuid::Uuid;
117

@@ -111,31 +107,6 @@ impl<'de> serde::Deserialize<'de> for UuidV7 {
111107
}
112108
}
113109

114-
impl SerializeValue for UuidV7 {
115-
fn serialize<'b>(
116-
&self, typ: &ColumnType, writer: CellWriter<'b>,
117-
) -> Result<WrittenCellProof<'b>, SerializationError> {
118-
self.0.serialize(typ, writer)
119-
}
120-
}
121-
122-
impl<'frame, 'metadata> DeserializeValue<'frame, 'metadata> for UuidV7 {
123-
fn type_check(typ: &ColumnType) -> Result<(), TypeCheckError> {
124-
Uuid::type_check(typ)
125-
}
126-
127-
fn deserialize(
128-
typ: &'metadata ColumnType<'metadata>, v: Option<FrameSlice<'frame>>,
129-
) -> Result<Self, DeserializationError> {
130-
let uuid = <Uuid as DeserializeValue>::deserialize(typ, v)?;
131-
if is_valid(&uuid) {
132-
Ok(Self(uuid))
133-
} else {
134-
Err(DeserializationError::new(UuidError::InvalidUuidV4(uuid)))
135-
}
136-
}
137-
}
138-
139110
#[cfg(test)]
140111
mod tests {
141112
use uuid::Uuid;

0 commit comments

Comments
 (0)