Skip to content

Commit f02cfd9

Browse files
committed
Fix indentation
1 parent b5c1242 commit f02cfd9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lib.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,19 +1742,19 @@ pub trait Itertools : Iterator {
17421742
/// assert_eq!(numbers.iter().find_or_last(|&&x| x > 2), Some(&3));
17431743
/// assert_eq!(std::iter::empty::<i32>().find_or_last(|&x| x > 5), None);
17441744
/// ```
1745-
fn find_or_last<P>(mut self, predicate: P) -> Option<Self::Item>
1746-
where Self: Sized,
1747-
P: FnMut(&Self::Item) -> bool,
1748-
{
1749-
#[inline]
1745+
fn find_or_last<P>(mut self, predicate: P) -> Option<Self::Item>
1746+
where Self: Sized,
1747+
P: FnMut(&Self::Item) -> bool,
1748+
{
1749+
#[inline]
17501750
fn check<T>(mut predicate: impl FnMut(&T) -> bool) -> impl FnMut(Option<T>, T) -> Result<Option<T>, T> {
17511751
move |_, x| {
17521752
if predicate(&x) { Result::Err(x) } else { Result::Ok(Some(x)) }
17531753
}
17541754
}
17551755

17561756
self.try_fold(None, check(predicate)).unwrap_or_else(Some)
1757-
}
1757+
}
17581758
/// Returns `true` if the given item is present in this iterator.
17591759
///
17601760
/// This method is short-circuiting. If the given item is present in this

0 commit comments

Comments
 (0)