From 812ec01293f244c3b05d2f77b47f6649122064ae Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Mon, 1 Feb 2016 23:14:03 +0100 Subject: [PATCH] Use join --- maud_macros/src/parse.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/maud_macros/src/parse.rs b/maud_macros/src/parse.rs index c526a562..dacb8139 100644 --- a/maud_macros/src/parse.rs +++ b/maud_macros/src/parse.rs @@ -376,11 +376,7 @@ impl<'cx, 'i> Parser<'cx, 'i> { } if !classes.is_empty() { self.render.attribute_start("class"); - let mut s = String::new(); - for class in classes { - s = s + &*class + " "; - } - self.render.string(s.trim()); + self.render.string(&classes.join(" ")); self.render.attribute_end(); } Ok(())