From daccb110db801bf396e09ffa5595d8316bd5484f Mon Sep 17 00:00:00 2001 From: Josh Mitchell Date: Mon, 16 Nov 2020 14:19:57 +1100 Subject: [PATCH] ErrorCode::is_eof() now takes self by value (8 bits) rather than reference (64 bits) --- src/errors.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index a5914e3..4986419 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -64,7 +64,7 @@ impl std::error::Error for Error { } else { None } - }, + } Error::CouldNotCheckNAtoms(err) => Some(err.as_ref()), _ => None, } @@ -200,7 +200,7 @@ pub enum ErrorCode { impl ErrorCode { /// 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) } }