From 4abf8e1d8c1fe872e6a4a90996f1531a2c28b353 Mon Sep 17 00:00:00 2001 From: Dave Grantham Date: Fri, 14 Jun 2024 13:09:53 -0700 Subject: [PATCH] fix cyclic dependency Signed-off-by: Dave Grantham --- Cargo.toml | 4 +--- src/codec.rs | 14 -------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b0c65c0..bbeb3f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "multicodec" -version = "1.0.7" +version = "1.0.8" edition = "2021" authors = ["Benjamin Kampmann ", "Dave Grantham "] description = "Implementation of the Multicodec specification" @@ -13,9 +13,7 @@ keywords = ["multiformats", "multicodec", "serde"] default = ["serde"] [dependencies] -multibase = { version = "1.0", git="https://github.com/cryptidtech/rust-multibase.git" } multitrait = { version = "1.0", git="https://github.com/cryptidtech/multitrait.git" } -multiutil = { version = "1.0", git="https://github.com/cryptidtech/multiutil.git" } serde = { version = "1.0", default-features = false, optional = true, features = ['serde_derive'] } thiserror = "1.0" diff --git a/src/codec.rs b/src/codec.rs index 40145b6..d950dc5 100644 --- a/src/codec.rs +++ b/src/codec.rs @@ -12,9 +12,7 @@ use core::{ fmt, hash::{Hash, Hasher}, }; -use multibase::Base; use multitrait::{EncodeInto, Null, TryDecodeFrom}; -use multiutil::EncodingInfo; macro_rules! build_codec_enum { {$( $val:expr => ($i:ident, $s:expr), )*} => { @@ -78,18 +76,6 @@ macro_rules! build_codec_enum { } } - impl EncodingInfo for Codec { - /// Return the preferred string encoding - fn preferred_encoding() -> Base { - Base::Base16Lower - } - - /// Same - fn encoding(&self) -> Base { - Self::preferred_encoding() - } - } - /// Serialize a Codec as a unsigned varint in a Vec impl Into> for Codec { fn into(self) -> Vec {