Use deref coercions when possible

This commit is contained in:
Thomas Bahn
2015-02-06 14:08:02 +01:00
parent 361acd37d0
commit 3022d7301a
14 changed files with 54 additions and 54 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ impl error::Error for Error {
match *self {
Error::SyntaxError(..) => "syntax error",
Error::IoError(ref error) => error.description(),
Error::ExpectedError(ref expected, _) => expected.as_slice(),
Error::ExpectedError(ref expected, _) => &expected,
Error::MissingFieldError(_) => "missing field",
Error::UnknownVariantError(_) => "unknown variant",
}