diff --git a/src/module/bm/mod.rs b/src/module/bm/mod.rs index 0ed5d392..f2b60468 100644 --- a/src/module/bm/mod.rs +++ b/src/module/bm/mod.rs @@ -294,7 +294,7 @@ impl<'a> Module<'a> for BM<'a> { impl<'a> Debug for BM<'a> { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "BM"); + try!(write!(fmt, "BM")); Ok(()) } diff --git a/src/storage/file/header/mod.rs b/src/storage/file/header/mod.rs index 8725d40d..cf0e8535 100644 --- a/src/storage/file/header/mod.rs +++ b/src/storage/file/header/mod.rs @@ -47,7 +47,7 @@ impl<'a> Error for MatchError<'a> { impl<'a> Debug for MatchError<'a> { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "{}", self.format()); + try!(write!(fmt, "{}", self.format())); Ok(()) } @@ -56,7 +56,7 @@ impl<'a> Debug for MatchError<'a> { impl<'a> Display for MatchError<'a> { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "{}", self.format()); + try!(write!(fmt, "{}", self.format())); Ok(()) } diff --git a/src/storage/file/id.rs b/src/storage/file/id.rs index afdc3d3d..6d239381 100644 --- a/src/storage/file/id.rs +++ b/src/storage/file/id.rs @@ -97,9 +97,9 @@ impl FileID { impl Debug for FileID { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "FileID[{:?}]: {:?}", + try!(write!(fmt, "FileID[{:?}]: {:?}", self.id_type, - self.id); + self.id)); Ok(()) } @@ -108,9 +108,9 @@ impl Debug for FileID { impl Display for FileID { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "FileID[{:?}]: {:?}", + try!(write!(fmt, "FileID[{:?}]: {:?}", self.id_type, - self.id); + self.id)); Ok(()) } diff --git a/src/storage/file/mod.rs b/src/storage/file/mod.rs index 11b1e827..4dde562a 100644 --- a/src/storage/file/mod.rs +++ b/src/storage/file/mod.rs @@ -85,7 +85,7 @@ impl File { impl Display for File { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, + try!(write!(fmt, "[File] Owner : '{:?}' FileID: '{:?}' Header: '{:?}' @@ -93,7 +93,7 @@ impl Display for File { self.owning_module_name, self.header, self.data, - self.id); + self.id)); Ok(()) } @@ -102,7 +102,7 @@ impl Display for File { impl Debug for File { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, + try!(write!(fmt, "[File] Owner : '{:?}' FileID: '{:?}' Header: '{:?}' @@ -110,7 +110,7 @@ impl Debug for File { self.owning_module_name, self.id, self.header, - self.data); + self.data)); Ok(()) } diff --git a/src/storage/json/parser.rs b/src/storage/json/parser.rs index ea5738b7..c49855f4 100644 --- a/src/storage/json/parser.rs +++ b/src/storage/json/parser.rs @@ -30,7 +30,7 @@ impl JsonHeaderParser { impl Display for JsonHeaderParser { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "JsonHeaderParser"); + try!(write!(fmt, "JsonHeaderParser")); Ok(()) } @@ -39,7 +39,7 @@ impl Display for JsonHeaderParser { impl Debug for JsonHeaderParser { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "JsonHeaderParser, Spec: {:?}", self.spec); + try!(write!(fmt, "JsonHeaderParser, Spec: {:?}", self.spec)); Ok(()) } diff --git a/src/storage/parser.rs b/src/storage/parser.rs index bcbf9a53..70cd3acb 100644 --- a/src/storage/parser.rs +++ b/src/storage/parser.rs @@ -57,13 +57,13 @@ impl Error for ParserError { impl Debug for ParserError { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "ParserError: {}\n\n", self.summary); + try!(write!(fmt, "ParserError: {}\n\n", self.summary)); if let Some(ref e) = self.explanation { - write!(fmt, "{}\n\n", e); + try!(write!(fmt, "{}\n\n", e)); } - write!(fmt, "On position {}\nin\n{}", self.index, self.parsertext); + try!(write!(fmt, "On position {}\nin\n{}", self.index, self.parsertext)); Ok(()) } @@ -72,10 +72,10 @@ impl Debug for ParserError { impl Display for ParserError { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "ParserError: {}", self.summary); + try!(write!(fmt, "ParserError: {}", self.summary)); if let Some(ref e) = self.explanation { - write!(fmt, "\n\n{}", e); + try!(write!(fmt, "\n\n{}", e)); } Ok(()) @@ -196,8 +196,7 @@ impl Debug for Parser { fn fmt(&self, fmt: &mut Formatter) -> fmt::Result { - write!(fmt, "Parser<{:?}>", self.headerp); - + try!(write!(fmt, "Parser<{:?}>", self.headerp)); Ok(()) }