Reorder imports (#2638)

This commit is contained in:
Charlie Marsh 2023-02-07 16:22:47 -05:00 committed by GitHub
parent 0355ba571e
commit 67e9ff7cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
233 changed files with 626 additions and 593 deletions

View file

@ -144,7 +144,8 @@ fn generate_impls<'a>(
}
}
/// If all values in an iterator are the same, return that value. Otherwise, return `None`.
/// If all values in an iterator are the same, return that value. Otherwise,
/// return `None`.
fn if_all_same<T: PartialEq>(iter: impl Iterator<Item = T>) -> Option<T> {
let mut iter = iter.peekable();
let first = iter.next()?;