diff options
| author | Marek Barvíř <barvirm@gmail.com> | 2023-04-16 11:10:35 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-16 11:10:35 +0200 |
| commit | ee32e7ad1ce26d4eebe601344e0343cfb9c8f9bd (patch) | |
| tree | e704cd3c622acbf9faca558dd808f284a7df78f3 /library/src/math/row.rs | |
| parent | 261b96da68890dd1054efb76a72ee997cb779bae (diff) | |
Clippy fixes (#581)
Diffstat (limited to 'library/src/math/row.rs')
| -rw-r--r-- | library/src/math/row.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/src/math/row.rs b/library/src/math/row.rs index ce9bc94a..0b0578aa 100644 --- a/library/src/math/row.rs +++ b/library/src/math/row.rs @@ -9,12 +9,12 @@ pub struct MathRow(Vec<MathFragment>); impl MathRow { pub fn new(fragments: Vec<MathFragment>) -> Self { - let mut iter = fragments.into_iter().peekable(); + let iter = fragments.into_iter().peekable(); let mut last: Option<usize> = None; let mut space: Option<MathFragment> = None; let mut resolved: Vec<MathFragment> = vec![]; - while let Some(mut fragment) = iter.next() { + for mut fragment in iter { match fragment { // Keep space only if supported by spaced fragments. MathFragment::Space(_) => { @@ -180,9 +180,9 @@ impl MathRow { } } - let mut fragments = self.0.into_iter().peekable(); + let fragments = self.0.into_iter().peekable(); let mut i = 0; - while let Some(fragment) = fragments.next() { + for fragment in fragments { if matches!(fragment, MathFragment::Align) { if let Some(&point) = points.get(i) { x = point; |
