Skip to content

Commit 0b832b3

Browse files
cleanup
1 parent b6bed0e commit 0b832b3

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
use std::fmt::{Display, Formatter};
33

44
use minicbor::{Decode, Decoder, Encode};
5-
use serde::Deserialize;
65
use uuid::Uuid;
76

87
use super::{decode_cbor_uuid, encode_cbor_uuid, CborContext, UuidError, INVALID_UUID};
@@ -98,7 +97,7 @@ impl From<UuidV4> for Uuid {
9897
impl<'de> serde::Deserialize<'de> for UuidV4 {
9998
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
10099
where D: serde::Deserializer<'de> {
101-
let uuid = <Uuid as Deserialize>::deserialize(deserializer)?;
100+
let uuid = Uuid::deserialize(deserializer)?;
102101
if is_valid(&uuid) {
103102
Ok(Self(uuid))
104103
} else {

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
use std::fmt::{Display, Formatter};
33

44
use minicbor::{Decode, Decoder, Encode};
5-
use serde::Deserialize;
65
use uuid::Uuid;
76

87
use super::{decode_cbor_uuid, encode_cbor_uuid, CborContext, UuidError, INVALID_UUID};
@@ -98,7 +97,7 @@ impl From<UuidV7> for Uuid {
9897
impl<'de> serde::Deserialize<'de> for UuidV7 {
9998
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
10099
where D: serde::Deserializer<'de> {
101-
let uuid = <Uuid as Deserialize>::deserialize(deserializer)?;
100+
let uuid = Uuid::deserialize(deserializer)?;
102101
if is_valid(&uuid) {
103102
Ok(Self(uuid))
104103
} else {

0 commit comments

Comments
 (0)