Skip to content

Commit

Permalink
Run cargo fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
AljoschaMeyer committed Nov 28, 2024
1 parent 394a386 commit 49e81e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
1 change: 0 additions & 1 deletion ufotofu/src/producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
//!
//! The [TestProducer] exists for testing code that interacts with arbitrary producers; it provides customisable behavior of which items to emit, when to emit the final item or an error, and varies the sizes of bulk buffers it exposes. To generate various configurations, we recommed using a [fuzzer](https://rust-fuzz.github.io/book/introduction.html).

#[macro_use]
mod macros;

Expand Down
18 changes: 8 additions & 10 deletions ufotofu/src/producer/test_producer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,14 +382,12 @@ impl<Item: Clone, Final, Error> BulkProducer for TestProducer<Item, Final, Error
}
} else {
match self.exposed_items_sizes {
None => {
Ok(Left(
BulkProducer::expose_items(&mut self.inner)
.await
.unwrap()
.unwrap_left(),
))
}
None => Ok(Left(
BulkProducer::expose_items(&mut self.inner)
.await
.unwrap()
.unwrap_left(),
)),
Some((ref exposed_item_sizes, ref mut index)) => {
let max_len: usize = exposed_item_sizes[*index].into();
*index = (*index + 1) % exposed_item_sizes.len();
Expand Down Expand Up @@ -418,8 +416,8 @@ impl<Item: Clone, Final, Error> BulkProducer for TestProducer<Item, Final, Error

{
BulkProducer::consider_produced(&mut self.inner, amount)
.await
.unwrap();
.await
.unwrap();
Ok(())
}
}
Expand Down

0 comments on commit 49e81e1

Please sign in to comment.