From a452bccd1c1abf1c60fe0da435c7db1a8bb5d50c Mon Sep 17 00:00:00 2001 From: greg Date: Sun, 11 Feb 2018 16:45:26 -0800 Subject: [PATCH] Don't need clone() here --- src/schala_lang/parsing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/schala_lang/parsing.rs b/src/schala_lang/parsing.rs index a8e5053..7892aa0 100644 --- a/src/schala_lang/parsing.rs +++ b/src/schala_lang/parsing.rs @@ -183,7 +183,7 @@ fn handle_alphabetic(c: char, input: &mut CharIter) -> TokenType { } match KEYWORDS.get(buf.as_str()) { - Some(kw) => TokenType::Keyword(kw.clone()), + Some(kw) => TokenType::Keyword(*kw), None => TokenType::Identifier(Rc::new(buf)), } }