1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 09:54:09 +01:00

Rename BatchIter -> Batching

This commit is contained in:
Roman Zeyde 2018-05-03 12:05:34 +03:00
parent c88a28e873
commit 06a2326e46
No known key found for this signature in database
GPG Key ID: 87CAE5FA46917CBB

View File

@ -312,17 +312,17 @@ impl<'a> Iterator for Indexer<'a> {
}
}
struct BatchIter<'a> {
struct Batching<'a> {
indexer: Indexer<'a>,
batch: Vec<Row>,
start: Instant,
bar: pbr::ProgressBar<Stderr>,
}
impl<'a> BatchIter<'a> {
fn new(indexer: Indexer<'a>) -> BatchIter<'a> {
impl<'a> Batching<'a> {
fn new(indexer: Indexer<'a>) -> Batching<'a> {
let bar = pbr::ProgressBar::on(stderr(), indexer.num_of_headers() as u64);
BatchIter {
Batching {
indexer: indexer,
batch: vec![],
start: Instant::now(),
@ -331,7 +331,7 @@ impl<'a> BatchIter<'a> {
}
}
impl<'a> Iterator for BatchIter<'a> {
impl<'a> Iterator for Batching<'a> {
type Item = Vec<Row>;
fn next(&mut self) -> Option<Vec<Row>> {
@ -404,7 +404,7 @@ impl Index {
}
}
let current_headers = daemon.enumerate_headers(&*indexed_headers).unwrap();
for rows in BatchIter::new(Indexer::new(
for rows in Batching::new(Indexer::new(
self.get_missing_headers(&indexed_headers.as_map(), &current_headers),
&daemon,
)) {