From 8e17b7424c332af2dd9e7daac730228827d44092 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:42:50 +0000 Subject: [PATCH] refactor: better variable naming --- helix-view/src/graphics.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/helix-view/src/graphics.rs b/helix-view/src/graphics.rs index 049dc534..58bcff2f 100644 --- a/helix-view/src/graphics.rs +++ b/helix-view/src/graphics.rs @@ -275,8 +275,7 @@ impl Color { /// assert_eq!(color1, color2); /// ``` pub fn from_hex(hex: &str) -> Option { - match [1..=2, 3..=4, 5..=6] - .map(|range| hex.get(range).and_then(|c| u8::from_str_radix(c, 16).ok())) + match [1..=2, 3..=4, 5..=6].map(|i| hex.get(i).and_then(|c| u8::from_str_radix(c, 16).ok())) { [Some(r), Some(g), Some(b)] => Some(Self::Rgb(r, g, b)), _ => None,