Skip to content

Commit

Permalink
fix cyclic dependency
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Grantham <[email protected]>
  • Loading branch information
Dave Grantham committed Jun 14, 2024
1 parent ca0bd34 commit 4abf8e1
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multicodec"
version = "1.0.7"
version = "1.0.8"
edition = "2021"
authors = ["Benjamin Kampmann <[email protected]>", "Dave Grantham <[email protected]>"]
description = "Implementation of the Multicodec specification"
Expand All @@ -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"

Expand Down
14 changes: 0 additions & 14 deletions src/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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), )*} => {
Expand Down Expand Up @@ -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<u8>
impl Into<Vec<u8>> for Codec {
fn into(self) -> Vec<u8> {
Expand Down

0 comments on commit 4abf8e1

Please sign in to comment.