ErrorCode::is_eof() now takes self by value (8 bits) rather than reference (64 bits)

This commit is contained in:
Josh Mitchell
2020-11-16 14:19:57 +11:00
parent 8ce523cb68
commit daccb110db

View File

@@ -64,7 +64,7 @@ impl std::error::Error for Error {
} else { } else {
None None
} }
}, }
Error::CouldNotCheckNAtoms(err) => Some(err.as_ref()), Error::CouldNotCheckNAtoms(err) => Some(err.as_ref()),
_ => None, _ => None,
} }
@@ -200,7 +200,7 @@ pub enum ErrorCode {
impl ErrorCode { impl ErrorCode {
/// True if the error is an end of file error, false otherwise /// True if the error is an end of file error, false otherwise
pub fn is_eof(&self) -> bool { pub fn is_eof(self) -> bool {
matches!(self, Self::ExdrEndOfFile) matches!(self, Self::ExdrEndOfFile)
} }
} }