From a4a91ad3ecde75c9f78aa57b30376ecf905da5f2 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Fri, 25 Jul 2025 10:52:42 +0400 Subject: [PATCH 1/2] add Deref impl for DocType --- rust/signed_doc/src/metadata/doc_type.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rust/signed_doc/src/metadata/doc_type.rs b/rust/signed_doc/src/metadata/doc_type.rs index eee39933f2..efaaf3c5a1 100644 --- a/rust/signed_doc/src/metadata/doc_type.rs +++ b/rust/signed_doc/src/metadata/doc_type.rs @@ -3,6 +3,7 @@ use std::{ fmt::{Display, Formatter}, hash::Hash, + ops::Deref, str::FromStr, }; @@ -13,6 +14,14 @@ use minicbor::{Decode, Decoder, Encode}; #[derive(Clone, Debug, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)] pub struct DocType(UuidV4); +impl Deref for DocType { + type Target = UuidV4; + + fn deref(&self) -> &Self::Target { + &self.0 + } +} + impl DocType { /// A const alternative impl of `TryFrom` /// From f729657d642980e091e1a51c21a2a767888b5b70 Mon Sep 17 00:00:00 2001 From: Mr-Leshiy Date: Fri, 25 Jul 2025 13:19:34 +0400 Subject: [PATCH 2/2] fix --- rust/catalyst-types/Cargo.toml | 2 +- rust/signed_doc/Cargo.toml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rust/catalyst-types/Cargo.toml b/rust/catalyst-types/Cargo.toml index 6107421e10..fe8b3b9cc5 100644 --- a/rust/catalyst-types/Cargo.toml +++ b/rust/catalyst-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "catalyst-types" -version = "0.0.3" +version = "0.0.4" edition.workspace = true license.workspace = true authors.workspace = true diff --git a/rust/signed_doc/Cargo.toml b/rust/signed_doc/Cargo.toml index f71e9d4add..2fb110293f 100644 --- a/rust/signed_doc/Cargo.toml +++ b/rust/signed_doc/Cargo.toml @@ -11,8 +11,8 @@ license.workspace = true workspace = true [dependencies] -catalyst-types = { version = "0.0.4", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "r20250724-01" } -cbork-utils = { version = "0.0.1", git = "https://github.com/input-output-hk/catalyst-libs.git", tag = "r20250724-01" } +catalyst-types = { version = "0.0.4", path = "../catalyst-types" } +cbork-utils = { version = "0.0.1", path = "../cbork-utils" } anyhow = "1.0.95" serde = { version = "1.0.217", features = ["derive"] }