diff --git a/src/error.rs b/src/error.rs index 334604a9..cbf3ff61 100644 --- a/src/error.rs +++ b/src/error.rs @@ -185,16 +185,19 @@ impl Error { } /// Returns the byte index the error occurred at. + #[must_use] pub fn index(&self) -> usize { self.index } /// Returns the current character the error occurred at. + #[must_use] pub fn character(&self) -> Option { self.character } /// Returns the type of error that occurred. + #[must_use] pub fn error(&self) -> &ErrorType { &self.error }