diff options
| author | Laurenz <laurmaedje@gmail.com> | 2021-07-16 12:03:00 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2021-07-16 12:07:15 +0200 |
| commit | 5edbd3a5b58c11939ea9823c6a847ba447254cb6 (patch) | |
| tree | 0b0ad36451f5a3b85bd0406fdb656cd0d2a11890 /src/layout/incremental.rs | |
| parent | 81f2f8f4c335dc399174d7c44a226bbc2cf98c8f (diff) | |
Use array's IntoIterator impl and nested or patterns
*yay*
Diffstat (limited to 'src/layout/incremental.rs')
| -rw-r--r-- | src/layout/incremental.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/layout/incremental.rs b/src/layout/incremental.rs index 429dc514..ca4839b6 100644 --- a/src/layout/incremental.rs +++ b/src/layout/incremental.rs @@ -227,12 +227,12 @@ impl Constraints { /// Changes all constraints by adding the `size` to them if they are `Some`. pub fn mutate(&mut self, size: Size, regions: &Regions) { - for spec in std::array::IntoIter::new([ + for spec in [ &mut self.min, &mut self.max, &mut self.exact, &mut self.base, - ]) { + ] { if let Some(horizontal) = spec.horizontal.as_mut() { *horizontal += size.width; } |
