Skip to content

Commit 96063e6

Browse files
committed
chore(doc strings): Make rustc v1.83.0 linter happy
All complaints were about this rule: https://rust-lang.github.io/rust-clippy/master/index.html#/too_long_first_doc_paragraph
1 parent 68a4a13 commit 96063e6

16 files changed

+36
-3
lines changed

tasm-lib/src/array/horner_evaluation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ use crate::data_type::ArrayType;
55
use crate::data_type::DataType;
66
use crate::traits::basic_snippet::BasicSnippet;
77

8+
/// Evaluate a polynomial in a point using the Horner method.
9+
///
810
/// HornerEvaluation takes an array of coefficients (representing a polynomial)
911
/// and a scalar (representing an indeterminate) and computes the value of the
1012
/// polynomial in that point. It can be used for univariate batching, whereby

tasm-lib/src/hashing/merkle_verify.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ use crate::library::Library;
33
use crate::traits::basic_snippet::BasicSnippet;
44
use triton_vm::prelude::*;
55

6+
/// Verify membership in a Merkle tree.
7+
///
68
/// MerkleVerify -- verify that a leaf lives in a Merkle tree,
79
/// given the root, leaf index, and leaf. The authentication path
810
/// is non-deterministically divined. This algorithm asserts

tasm-lib/src/hashing/sponge_hasher/squeeze.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ use crate::library::Library;
77
use crate::memory::dyn_malloc::DynMalloc;
88
use crate::traits::basic_snippet::BasicSnippet;
99

10+
/// Squeeze the sponge and return an array of `[RATE]` elements
11+
///
1012
/// Snippet that emulates the Tip5 implementation of twenty-first's
1113
/// `sponge_hasher` trait function `squeeze`. You probably don't want to use
1214
/// this snippet for whatever cryptography you're doing and instead use the

tasm-lib/src/hashing/squeeze_repeatedly_static_number.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use triton_vm::twenty_first::math::tip5::RATE;
44
use crate::data_type::DataType;
55
use crate::traits::basic_snippet::BasicSnippet;
66

7+
/// Squeeze the sponge a statically-known number of times.
8+
///
79
/// Squeeze the sponge `num_squeezes` times, storing all the produced pseudorandom `BFieldElement`s
810
/// contiguously in memory. It is the caller's responsibility to allocate enough memory.
911
/// Number of squeezes must be statically known.

tasm-lib/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,8 @@ pub fn execute_with_terminal_state(
282282
}
283283
}
284284

285+
/// Run prover on the program, with stack-initialization converted to code.
286+
///
285287
/// Run the prover on the program. If `init_stack` is provided, the prover is run on a program
286288
/// with the code to setup the stack prepended, since the prover will always fail if the stack
287289
/// is not initialized to the minimal height. The first `NUM_OP_STACK_REGISTERS` of `init_stack`

tasm-lib/src/list/multiset_equality_digests.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ use crate::library::Library;
66
use crate::list::length::Length;
77
use crate::traits::basic_snippet::BasicSnippet;
88

9-
/// Determine whether two lists are equal up to permutation. The
10-
/// lists are given as lists of digests. This function uses hashing
9+
/// Determine whether two lists are equal up to permutation.
10+
///
11+
/// The lists are given as lists of digests. This function uses hashing
1112
/// to compute a challenge indeterminate, and then computes a running
1213
/// products for both lists. In the future, the implementation of
1314
/// function may be replaced by one that uses Triton VM's native

tasm-lib/src/mmr/verify_mmr_successor.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ use crate::{
2222
Digest,
2323
};
2424

25+
/// Verify that one MMR is a successor to another.
26+
///
2527
/// Verify a the scucessorship relation between two MMRs. A `MmrSuccessorProof`
2628
/// is necessary to demonstrate this relation, but it is not a *stack* argument
2729
/// because this algorithm obtains the relevant info (authentication paths) from

tasm-lib/src/traits/algorithm.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ use crate::VmHasher;
1717
use super::basic_snippet::BasicSnippet;
1818
use super::rust_shadow::RustShadow;
1919

20+
/// An Algorithm can modify memory and take ND_input.
21+
///
2022
/// An Algorithm is a piece of tasm code that can modify memory even at addresses below
2123
/// the dynamic memory allocator, and can take nondeterministic input. It cannot read from
2224
/// standard in or write to standard out.

tasm-lib/src/traits/function.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ use crate::VmHasher;
1616
use super::basic_snippet::BasicSnippet;
1717
use super::rust_shadow::RustShadow;
1818

19+
/// A function can modify stack and extend memory.
20+
///
1921
/// A Function is a piece of tasm code that can modify the top of the stack, and can read
2022
/// and even extend memory. Specifically: any memory writes have to happen to addresses
2123
/// larger than the dynamic memory allocator and the dynamic memory allocator value has to

tasm-lib/src/traits/procedure.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ use crate::traits::rust_shadow::RustShadow;
2222
use crate::InitVmState;
2323
use crate::VmHasher;
2424

25+
/// A trait that can modify all parts of the VM state.
26+
///
2527
/// A Procedure is a piece of tasm code that can do almost anything: modify stack, read
2628
/// from and write to memory, take in nondeterminism, and read and write from standard
2729
/// input/output. What it cannot do is stand alone. In other words, it is still wrapped

0 commit comments

Comments
 (0)