From 975b4256c709e0f76017632f841da6946f566405 Mon Sep 17 00:00:00 2001 From: UnMaykr <98741738+unmaykr-aftermath@users.noreply.github.com> Date: Thu, 19 Dec 2024 13:16:48 -0300 Subject: [PATCH] feat(sui-sdk-types): add From for TypeTag (#77) Closes #73 --- crates/sui-sdk-types/src/types/type_tag/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/sui-sdk-types/src/types/type_tag/mod.rs b/crates/sui-sdk-types/src/types/type_tag/mod.rs index 4aaf6f4ce..19fb484a0 100644 --- a/crates/sui-sdk-types/src/types/type_tag/mod.rs +++ b/crates/sui-sdk-types/src/types/type_tag/mod.rs @@ -51,6 +51,12 @@ impl std::str::FromStr for TypeTag { } } +impl From for TypeTag { + fn from(value: StructTag) -> Self { + Self::Struct(Box::new(value)) + } +} + #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] pub struct TypeParseError { source: String,