From e3b22d488d441a8b7560d06dd38788439a751189 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Tue, 29 Dec 2015 15:05:44 +0100 Subject: [PATCH] Remove box-syntax in test --- src/storage/json/parser.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/storage/json/parser.rs b/src/storage/json/parser.rs index 8a76436b..ea5738b7 100644 --- a/src/storage/json/parser.rs +++ b/src/storage/json/parser.rs @@ -148,6 +148,8 @@ impl Serialize for FileHeaderData { #[cfg(test)] mod test { + use std::ops::Deref; + use super::JsonHeaderParser; use storage::parser::{FileHeaderParser, ParserError}; use storage::file::header::data::FileHeaderData as FHD; @@ -177,9 +179,9 @@ mod test { Some(FHD::Map{keys: keys}) => { for k in keys { match k { - FHD::Key{name: name, value: box value} => { + FHD::Key{name: name, value: value} => { assert!(name == "a" || name == "b", "Key unknown"); - match &value { + match value.deref() { &FHD::UInteger(u) => assert_eq!(u, 1), &FHD::Integer(i) => assert_eq!(i, -2), _ => assert!(false, "Integers are not here"),