From 14972fa6d7777d2c8b857352a529203ded5b1a33 Mon Sep 17 00:00:00 2001 From: Richard Newman Date: Thu, 23 Feb 2017 09:20:23 -0800 Subject: [PATCH] Pre: use Option::cloned() instead of a cloning closure. --- tx-parser/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tx-parser/src/lib.rs b/tx-parser/src/lib.rs index 1fc96375..92e29543 100644 --- a/tx-parser/src/lib.rs +++ b/tx-parser/src/lib.rs @@ -37,7 +37,7 @@ fn fn_parser(f: fn(I) -> ParseResult, err: &'static str) -> TxParser def_value_satisfy_parser_fn!(Tx, integer, i64, Value::as_integer); fn value_to_namespaced_keyword(val: &Value) -> Option { - val.as_namespaced_keyword().map(|x| x.clone()) + val.as_namespaced_keyword().cloned() } def_value_satisfy_parser_fn!(Tx, keyword, NamespacedKeyword, value_to_namespaced_keyword);