Skip to content

Commit

Permalink
const initialization functions
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirhemo committed Feb 27, 2024
1 parent f8d1a22 commit e05701b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fri/src/two_adic_pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub struct TwoAdicFriPcs<C: TwoAdicFriPcsGenericConfig> {
}

impl<C: TwoAdicFriPcsGenericConfig> TwoAdicFriPcs<C> {
pub fn new(fri: FriConfig<C::FriMmcs>, dft: C::Dft, mmcs: C::InputMmcs) -> Self {
pub const fn new(fri: FriConfig<C::FriMmcs>, dft: C::Dft, mmcs: C::InputMmcs) -> Self {
Self { fri, dft, mmcs }
}
}
Expand Down
2 changes: 1 addition & 1 deletion merkle-tree/src/mmcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct FieldMerkleTreeMmcs<P, PW, H, C, const DIGEST_ELEMS: usize> {
}

impl<P, PW, H, C, const DIGEST_ELEMS: usize> FieldMerkleTreeMmcs<P, PW, H, C, DIGEST_ELEMS> {
pub fn new(hash: H, compress: C) -> Self {
pub const fn new(hash: H, compress: C) -> Self {
Self {
hash,
compress,
Expand Down
2 changes: 1 addition & 1 deletion symmetric/src/compression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ where
T: Clone,
H: CryptographicHasher<T, [T; CHUNK]>,
{
pub fn new(hasher: H) -> Self {
pub const fn new(hasher: H) -> Self {
Self {
hasher,
_phantom: PhantomData,
Expand Down
4 changes: 2 additions & 2 deletions symmetric/src/serializing_hasher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ pub struct SerializingHasher64<Inner> {
}

impl<Inner> SerializingHasher32<Inner> {
pub fn new(inner: Inner) -> Self {
pub const fn new(inner: Inner) -> Self {
Self { inner }
}
}

impl<Inner> SerializingHasher64<Inner> {
pub fn new(inner: Inner) -> Self {
pub const fn new(inner: Inner) -> Self {
Self { inner }
}
}
Expand Down

0 comments on commit e05701b

Please sign in to comment.