From 901dbcdb838f2fdf1dd77e3565b279a227b3049e Mon Sep 17 00:00:00 2001 From: figsoda Date: Mon, 2 Nov 2020 18:43:00 -0500 Subject: [PATCH] replace range loop with enumerate --- src/layout.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layout.rs b/src/layout.rs index 1ff617f..4227cc7 100644 --- a/src/layout.rs +++ b/src/layout.rs @@ -182,14 +182,14 @@ pub fn render( }; let mut items = Vec::with_capacity(len); - for i in 0 .. len { + for (i, track) in queue.iter().enumerate() { let mut spans = Vec::new(); flatten( &mut spans, txts, status, current_track, - Some(&queue[i]), + Some(track), i == selected, Style::default(), );