Skip to content

Commit efcfc3d

Browse files
committed
Run cargo fmt
1 parent 6d5e701 commit efcfc3d

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/common.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ pub mod errors;
66
pub mod producer;
77

88
#[cfg(all(feature = "dev", feature = "alloc"))]
9-
pub(crate) mod test_yielder;
9+
pub(crate) mod test_yielder;

src/common/consumer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ pub use scramble::{ConsumeOperations, Scramble_ as Scramble};
3131
#[cfg(all(feature = "dev", feature = "alloc"))]
3232
mod test_consumer;
3333
#[cfg(all(feature = "dev", feature = "alloc"))]
34-
pub use test_consumer::{TestConsumer_ as TestConsumer, TestConsumerBuilder};
34+
pub use test_consumer::{TestConsumerBuilder, TestConsumer_ as TestConsumer};

src/common/consumer/test_consumer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ impl<Item, Final, Error> TestConsumer<Item, Final, Error> {
298298

299299
fn check_error(&mut self) -> Result<(), Error> {
300300
if self.operations_until_error == 0 {
301-
Err(self.error.take().unwrap())// Can unwrap because the invariant wrapper panics before unwrapping can be reached.
301+
Err(self.error.take().unwrap()) // Can unwrap because the invariant wrapper panics before unwrapping can be reached.
302302
} else {
303303
self.operations_until_error -= 1;
304304
Ok(())
@@ -338,7 +338,7 @@ impl<Item, Final, Error> Consumer for TestConsumer<Item, Final, Error> {
338338
{
339339
Consumer::consume(&mut self.inner, item).unwrap();
340340
Ok(())
341-
}// may unwrap because Err<!>
341+
} // may unwrap because Err<!>
342342
}
343343

344344
fn close(&mut self, fin: Self::Final) -> Result<(), Self::Error> {
@@ -348,7 +348,7 @@ impl<Item, Final, Error> Consumer for TestConsumer<Item, Final, Error> {
348348
{
349349
Consumer::close(&mut self.inner, ()).unwrap();
350350
Ok(())
351-
}// may unwrap because Err<!>
351+
} // may unwrap because Err<!>
352352
}
353353
}
354354

@@ -359,7 +359,7 @@ impl<Item, Final, Error> BufferedConsumer for TestConsumer<Item, Final, Error> {
359359
{
360360
BufferedConsumer::flush(&mut self.inner).unwrap();
361361
Ok(())
362-
}// may unwrap because Err<!>
362+
} // may unwrap because Err<!>
363363
}
364364
}
365365

src/local_nb/consumer.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! The [SyncToLocalNb] adaptor allows you to use a [`sync::Consumer`](crate::sync::Consumer) as a [`local_nb::Consumer`](crate::local_nb::Consumer).
1212
//!
1313
//! ## Development Helpers
14-
//!
14+
//!
1515
//! Use the [TestConsumer] for testing code that interacts with arbitrary consumers.
1616
//!
1717
//! The [Invariant] adaptor wraps any consumer and makes it panic during tests when some client code violates the API contracts imposed by the consumer traits. In production builds, the wrapper does nothing and compiles away without any overhead. We recommend using this wrapper as an implementation detail of all custom consumers; all consumers in the ufotofu crate use this wrapper internally as well.
@@ -31,4 +31,4 @@ pub use crate::common::consumer::{IntoVec, IntoVecFallible};
3131
pub use crate::common::consumer::{ConsumeOperations, Scramble};
3232

3333
#[cfg(all(feature = "dev", feature = "alloc"))]
34-
pub use crate::common::consumer::{TestConsumer, TestConsumerBuilder};
34+
pub use crate::common::consumer::{TestConsumer, TestConsumerBuilder};

src/sync/consumer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! The [IntoVec] consumer consumes items into a `Vec` that grows to fit an arbitrary number of items. The [IntoVecFallible] consumer does the same, but reports memory allocation errors instead of panicking.
88
//!
99
//! ## Development Helpers
10-
//!
10+
//!
1111
//! Use the [TestConsumer] for testing code that interacts with arbitrary consumers.
1212
//!
1313
//! The [Invariant] adaptor wraps any consumer and makes it panic during tests when some client code violates the API contracts imposed by the consumer traits. In production builds, the wrapper does nothing and compiles away without any overhead. We recommend using this wrapper as an implementation detail of all custom consumers; all consumers in the ufotofu crate use this wrapper internally as well.

0 commit comments

Comments
 (0)