Skip to content

Commit

Permalink
Merge #253: Fix words
Browse files Browse the repository at this point in the history
4ce10ff fix: Export Word type (Christian Lewe)

Pull request description:

  I forgot to export the `Word` type in the last PR.

ACKs for top commit:
  apoelstra:
    ACK 4ce10ff successfully ran local tests

Tree-SHA512: 819b350071a026cb797e7f43a72e01c325373d5b02dcaaa41671f0bff4c2b49cc1f3e982f4a5a5e1da9ce89c5ed9d64b0a7271c35c55c119e6cc97564f301445
  • Loading branch information
apoelstra committed Oct 14, 2024
2 parents 6af2c3e + 4ce10ff commit fbe88d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub use crate::merkle::{
FailEntropy,
};
pub use crate::node::{CommitNode, ConstructNode, RedeemNode, WitnessNode};
pub use crate::value::Value;
pub use crate::value::{Value, Word};
pub use simplicity_sys as ffi;
use std::fmt;

Expand Down
1 change: 1 addition & 0 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ impl Word {
/// Return the bit length of the word.
///
/// The word is of type `TWO^(2^n)`. Return `2^n`.
#[allow(clippy::len_without_is_empty)]
pub fn len(&self) -> usize {
2usize.pow(self.n)
}
Expand Down

0 comments on commit fbe88d6

Please sign in to comment.