mirror of
https://github.com/dnlbauer/xdrfile.git
synced 2026-09-10 22:25:30 +00:00
ErrorCode::is_eof() now takes self by value (8 bits) rather than reference (64 bits)
This commit is contained in:
@@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user