From 67ab4fd8c0ebd0e1e638307c6b303cce5cc13e9c Mon Sep 17 00:00:00 2001 From: bungoboingo Date: Tue, 18 Oct 2022 18:05:53 -0700 Subject: Updated syntax for color stop iteration re: PR comments. --- glow/src/triangle/gradient.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'glow/src/triangle') 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; -- cgit