Skip to content

Commit

Permalink
bump derive_more from 0.99.18 to 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vegetabledogdog committed Oct 25, 2024
1 parent dcae2ec commit b9aa929
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ chrono = "0.4.23"
coerce = "0.8"
datatest-stable = "0.1.3"
derive_builder = "0.20"
derive_more = "0.99.18"
derive_more = { version = "1.0.0", features = ["as_ref", "from"] }
dirs = "5.0.1"
enum_dispatch = "^0.3"
ethereum-types = "0.14.1"
Expand Down
16 changes: 3 additions & 13 deletions crates/rooch-types/src/crypto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use crate::{
use anyhow::{anyhow, bail};
use bech32::{encode, Bech32, EncodeError};
use bitcoin::secp256k1::SecretKey;
use derive_more::{AsMut, AsRef, From};
use derive_more::{AsRef, From};
pub use enum_dispatch::enum_dispatch;
use eyre::eyre;
pub use fastcrypto::traits::KeyPair as KeypairTraits;
Expand Down Expand Up @@ -614,14 +614,6 @@ impl AsRef<[u8]> for Signature {
}
}
}
impl AsMut<[u8]> for Signature {
fn as_mut(&mut self) -> &mut [u8] {
match self {
Signature::Ed25519RoochSignature(sig) => sig.as_mut(),
Signature::Secp256k1RoochSignature(sig) => sig.as_mut(),
}
}
}

impl ToFromBytes for Signature {
fn from_bytes(bytes: &[u8]) -> Result<Self, FastCryptoError> {
Expand Down Expand Up @@ -704,9 +696,8 @@ impl<S: RoochSignatureInner + Sized> RoochSignature for S {
// Ed25519 Rooch Signature port
//
#[serde_as]
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, AsRef, AsMut)]
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, AsRef)]
#[as_ref(forward)]
#[as_mut(forward)]
pub struct Ed25519RoochSignature(
#[schemars(with = "Base64")]
#[serde_as(as = "Readable<Base64, Bytes>")]
Expand Down Expand Up @@ -748,9 +739,8 @@ impl RoochSignatureInner for Ed25519RoochSignature {
// Secp256k1 Signature port
//
#[serde_as]
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, AsRef, AsMut)]
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema, PartialEq, Eq, Hash, AsRef)]
#[as_ref(forward)]
#[as_mut(forward)]
pub struct Secp256k1RoochSignature(
#[schemars(with = "Base64")]
#[serde_as(as = "Readable<Base64, Bytes>")]
Expand Down

0 comments on commit b9aa929

Please sign in to comment.