Skip to content

Commit a5a552f

Browse files
committed
docs and changelog
1 parent 1b9d346 commit a5a552f

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

fvm/src/state_tree.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,7 @@ where
364364
self.hamt.into_store()
365365
}
366366

367+
/// Iterates over each KV in the Hamt and runs a function on the values with cache.
367368
pub fn for_each<F>(&self, mut f: F) -> anyhow::Result<()>
368369
where
369370
F: FnMut(Address, &ActorState) -> anyhow::Result<()>,
@@ -375,6 +376,7 @@ where
375376
Ok(())
376377
}
377378

379+
/// Iterates over each KV in the Hamt and runs a function on the values without cache.
378380
pub fn for_each_cacheless<F>(&self, mut f: F) -> anyhow::Result<()>
379381
where
380382
F: FnMut(Address, &ActorState) -> anyhow::Result<()>,

ipld/hamt/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ Changes to the reference FVM's HAMT implementation.
44

55
## [Unreleased]
66

7+
- Added `for_each_cacheless` method to iterate over the HAMT without caching the values. This is lowers memory requirements usage and is useful for single-pass, read-only operations over large HAMTs.
8+
79
## 0.10.4 [2025-04-09]
810

911
- Updates multiple dependencies (semver breaking internally but not exported).

0 commit comments

Comments
 (0)