Commit 1d475e4
authored
feat: nodes accessor for
## Description
This PR adds a `nodes` method to the `LeanIMT` struct, exposing the
internal nodes structure as a slice (`&[Vec<[u8; N]>]`).
It also fixes minor clippy warnings by allowing `manual_div_ceil` and
reformat the example in `lib.rs`.
- **What kind of change?** Feature addition
- **Current behavior**: No method exists to access the internal nodes
structure of `LeanIMT`.
- **New behavior**: The `nodes` method returns a reference to the
internal nodes, allowing read-only access.
- **Breaking change?** No.
## Related Issue(s)
Resolves #76
## Other information
The change is minimal and does not affect existing functionality. No new
tests were added as the method is a simple accessor, but existing tests
pass.
## Checklist
- [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.
- [x] I have run `cargo fmt` without getting any errors.
- [ ] I have added tests that prove my fix is effective or that my
feature works.
- [x] New and existing unit tests pass locally with my changes.lean-imt (#77)1 parent 1014994 commit 1d475e4
2 files changed
+16
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
268 | 270 | | |
269 | 271 | | |
270 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
271 | 278 | | |
272 | 279 | | |
273 | 280 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
39 | 38 | | |
40 | | - | |
41 | | - | |
| 39 | + | |
| 40 | + | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | | - | |
| 42 | + | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
0 commit comments