Skip to content

Commit 7eab7e3

Browse files
committed
Fix formatting
1 parent 8efd9c9 commit 7eab7e3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

enum-iterator/src/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ pub fn next<T: Sequence>(x: &T) -> Option<T> {
151151
/// assert_eq!(next_cycle(&Day::Sunday), Day::Monday);
152152
/// ```
153153
pub fn next_cycle<T: Sequence>(x: &T) -> T {
154-
next(x).or_else(first).expect("Sequence::first returned None for inhabited type")
154+
next(x)
155+
.or_else(first)
156+
.expect("Sequence::first returned None for inhabited type")
155157
}
156158

157159
/// Returns the previous value of type `T` or `None` if this was the beginning.
@@ -183,7 +185,9 @@ pub fn previous<T: Sequence>(x: &T) -> Option<T> {
183185
/// assert_eq!(previous_cycle(&Day::Monday), Day::Sunday);
184186
/// ```
185187
pub fn previous_cycle<T: Sequence>(x: &T) -> T {
186-
previous(x).or_else(last).expect("Sequence::last returned None for inhabited type")
188+
previous(x)
189+
.or_else(last)
190+
.expect("Sequence::last returned None for inhabited type")
187191
}
188192

189193
/// Returns the first value of type `T`.

0 commit comments

Comments
 (0)