From 25adf32d9fb0e24bcab1a8f86fe6661cf17a1d5d Mon Sep 17 00:00:00 2001 From: Manuel Cillero Date: Sat, 27 Jul 2024 23:10:21 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Code=20tweak?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/html/opt_classes.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/html/opt_classes.rs b/src/html/opt_classes.rs index b631da64..453991cd 100644 --- a/src/html/opt_classes.rs +++ b/src/html/opt_classes.rs @@ -85,9 +85,9 @@ impl OptionClasses { } #[inline] - fn add(&mut self, classes: &Vec<&str>, mut pos: usize) { - for class in classes { - if !class.is_empty() && !self.0.iter().any(|c| c.eq(class)) { + fn add(&mut self, classes: &[&str], mut pos: usize) { + for &class in classes { + if !class.is_empty() && !self.0.iter().any(|c| c == class) { self.0.insert(pos, class.to_string()); pos += 1; }