diff options
author | 2022-10-18 18:05:53 -0700 | |
---|---|---|
committer | 2022-10-18 18:05:53 -0700 | |
commit | 67ab4fd8c0ebd0e1e638307c6b303cce5cc13e9c (patch) | |
tree | e358060db247e3c1376da17fa019bc4fe4ccd4a7 /glow | |
parent | ab311c9375999d568a599b31424a12beb3f02ad2 (diff) | |
download | iced-67ab4fd8c0ebd0e1e638307c6b303cce5cc13e9c.tar.gz iced-67ab4fd8c0ebd0e1e638307c6b303cce5cc13e9c.tar.bz2 iced-67ab4fd8c0ebd0e1e638307c6b303cce5cc13e9c.zip |
Updated syntax for color stop iteration re: PR comments.
Diffstat (limited to 'glow')
-rw-r--r-- | glow/src/triangle/gradient.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/glow/src/triangle/gradient.rs b/glow/src/triangle/gradient.rs index 6bca44ee..36e434e3 100644 --- a/glow/src/triangle/gradient.rs +++ b/glow/src/triangle/gradient.rs @@ -81,8 +81,7 @@ impl Program { let mut stops = [0.0; 128]; - for (index, stop) in linear.color_stops.iter().enumerate() { - if index == 16 { break; } + for (index, stop) in linear.color_stops.iter().enumerate().take(16) { stops[index*8] = stop.color.r; stops[(index*8)+1] = stop.color.g; stops[(index*8)+2] = stop.color.b; |