Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "committable"
version = "0.2.3"
version = "0.2.4"
edition = "2021"
rust-version = "1.65.0"
authors = ["Espresso Systems <[email protected]>"]
Expand Down
6 changes: 5 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,18 @@ pub trait CommitmentBounds:
}

#[cfg(not(feature = "serde"))]
trait CommitmentBounds: CommitmentBoundsSerdeless {}
pub trait CommitmentBounds: CommitmentBoundsSerdeless {}

impl<T> CommitmentBounds for Commitment<T> where T: Committable + 'static {}

impl<T: ?Sized + Committable> Commitment<T> {
pub fn into_bits(self) -> BitVec<u8, bitvec::order::Lsb0> {
BitVec::try_from(self.0.to_vec()).unwrap()
}

pub fn from_raw(bytes: [u8; 32]) -> Self {
Self(bytes, PhantomData)
}
}

// clippy pacification: `non_canonical_clone_impl` aka `incorrect_clone_impl_on_copy_type`
Expand Down
Loading