mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-03 18:28:24 +00:00
Reorder imports (#2638)
This commit is contained in:
parent
0355ba571e
commit
67e9ff7cc8
233 changed files with 626 additions and 593 deletions
|
@ -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()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue