Skip to content

Commit 7bf3a5d

Browse files
Ben-PHvplasencia
andauthored
doc: Document batch insertion error (#75)
<!-- Please refer to our CONTRIBUTING documentation for any questions on submitting a pull request. --> <!-- Provide a general summary of your changes in the Title above. --> ## Description <!-- Describe your changes in detail. --> <!-- You may want to answer some of the following questions: --> <!-- What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) --> <!-- What is the current behavior?** (You can also link to an open issue here) --> <!-- What is the new behavior (if this is a feature change)? --> <!-- Does this PR introduce a breaking change?** (What changes might users need to make in their application due to this PR?) --> ## Related Issue(s) <!-- This project accepts pull requests related to open issues. --> <!-- If suggesting a new feature or change, please discuss it in an issue first. --> <!-- If fixing a bug, there should be an issue describing it with steps to reproduce. --> <!-- Please link to the issue(s) here --> <!-- Closes # --> <!-- Fixes # --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> <!-- Feel free to remove this section if you will not use it. --> ## Checklist <!-- Please check if the PR fulfills these requirements. --> - [x] I have read and understand the [contributor guidelines](https://github.com/privacy-scaling-explorations/zk-kit.rust/blob/main/CONTRIBUTING.md) and [code of conduct](https://github.com/privacy-scaling-explorations/zk-kit.rust/blob/main/CODE_OF_CONDUCT.md). - [x] I have performed a self-review of my code - [x] I have commented my code, particularly in hard-to-understand areas - [x] My changes generate no new warnings - [ ] I have run `yarn style` without getting any errors - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes > [!IMPORTANT] > We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical mistake, please feel free to message the team. --------- Co-authored-by: Vivian Plasencia <[email protected]>
1 parent c51185c commit 7bf3a5d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

crates/lean-imt/src/hashed_tree.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ where
4040
}
4141

4242
/// Inserts multiple leaves.
43+
///
44+
/// # Errors
45+
///
46+
/// Will return [`LeanIMTError::EmptyBatchInsert`] if `leaves` is an empty array
4347
pub fn insert_many(&mut self, leaves: &[[u8; N]]) -> Result<(), LeanIMTError> {
4448
self.tree.insert_many(leaves, H::hash)
4549
}

crates/lean-imt/src/lean_imt.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ impl<const N: usize> LeanIMT<N> {
8686
}
8787

8888
/// Inserts multiple leaves.
89+
///
90+
/// # Errors
91+
///
92+
/// Will return [`LeanIMTError::EmptyBatchInsert`] if `leaves` is an empty array
8993
pub fn insert_many(
9094
&mut self,
9195
leaves: &[[u8; N]],

0 commit comments

Comments
 (0)