From 9dde3e4f72b9ef3371a5997802fbb9180652b04f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 30 Oct 2015 17:46:25 +0100 Subject: [PATCH] Remove path member from MatchError At this point, this is too complicated to implement for me. --- src/storage/file.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/storage/file.rs b/src/storage/file.rs index f37081b8..0d0df446 100644 --- a/src/storage/file.rs +++ b/src/storage/file.rs @@ -54,7 +54,6 @@ impl Display for FileHeaderSpec { pub struct MatchError<'a> { summary: String, - path: Vec, expected: &'a FileHeaderSpec, found: &'a FileHeaderData } @@ -62,20 +61,18 @@ pub struct MatchError<'a> { impl<'a> MatchError<'a> { pub fn new(s: String, - path: Vec, ex: &'a FileHeaderSpec, found: &'a FileHeaderData) -> MatchError<'a> { MatchError { summary: s, - path: path, expected: ex, found: found, } } pub fn format(&self) -> String { - format!("MatchError: {:?}\n\nHaving: {:?}\nExpected: {:?}\nFound: {:?}\n", - self.summary, self.path, self.expected, self.found) + format!("MatchError: {:?}\nExpected: {:?}\nFound: {:?}\n", + self.summary, self.expected, self.found) } } @@ -144,7 +141,6 @@ pub fn match_header_spec<'a>(spec: &'a FileHeaderSpec, data: &'a FileHeaderData) (k, v) => { return Some(MatchError::new(String::from("Expected type does not match found type"), - vec![], k, v )) }