From 27d4c2ccbdf4f05cf3bb503250c51fe408b304c2 Mon Sep 17 00:00:00 2001 From: greg Date: Mon, 2 Jan 2017 22:17:21 -0800 Subject: [PATCH] No references in pattern-matching --- src/parser.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parser.rs b/src/parser.rs index 7a1c636..3debcb8 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -64,11 +64,11 @@ impl fmt::Display for ASTNode { impl fmt::Display for Expression { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { use self::Expression::*; - match self { - &Null => write!(f, "null"), - &StringLiteral(ref s) => write!(f, "\"{}\"", s), - &Number(n) => write!(f, "{}", n), - &Lambda(Function { prototype: Prototype { ref name, ref parameters, .. }, .. }) => { + match *self { + Null => write!(f, "null"), + StringLiteral(ref s) => write!(f, "\"{}\"", s), + Number(n) => write!(f, "{}", n), + Lambda(Function { prototype: Prototype { ref name, ref parameters, .. }, .. }) => { write!(f, "«function: {}, {} arg(s)»", name, parameters.len()) } _ => write!(f, "UNIMPLEMENTED"),