mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-26 01:34:45 -07:00
computer: stateful: refactor part 2
This commit is contained in:
@@ -49,6 +49,10 @@ impl<T> AddressGroups<T> {
|
||||
.chain(self.lt_amount.par_iter_mut())
|
||||
}
|
||||
|
||||
pub fn iter_separate(&self) -> impl Iterator<Item = &T> {
|
||||
self.amount_range.iter()
|
||||
}
|
||||
|
||||
pub fn iter_separate_mut(&mut self) -> impl Iterator<Item = &mut T> {
|
||||
self.amount_range.iter_mut()
|
||||
}
|
||||
|
||||
@@ -84,6 +84,14 @@ impl<T> UTXOGroups<T> {
|
||||
.chain(self.type_.par_iter_mut())
|
||||
}
|
||||
|
||||
pub fn iter_separate(&self) -> impl Iterator<Item = &T> {
|
||||
self.age_range
|
||||
.iter()
|
||||
.chain(self.epoch.iter())
|
||||
.chain(self.amount_range.iter())
|
||||
.chain(self.type_.iter())
|
||||
}
|
||||
|
||||
pub fn iter_separate_mut(&mut self) -> impl Iterator<Item = &mut T> {
|
||||
self.age_range
|
||||
.iter_mut()
|
||||
|
||||
Reference in New Issue
Block a user