mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 16:08:05 +00:00
change error handlers to be mutable
This commit is contained in:
+5
-5
@@ -231,27 +231,27 @@ mod deserializer {
|
||||
|
||||
impl de::Deserializer<Error> for AnimalDeserializer {
|
||||
#[inline]
|
||||
fn end_of_stream_error(&self) -> Error {
|
||||
fn end_of_stream_error(&mut self) -> Error {
|
||||
EndOfStream
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn syntax_error(&self, _token: de::Token, _expected: &[de::TokenKind]) -> Error {
|
||||
fn syntax_error(&mut self, _token: de::Token, _expected: &[de::TokenKind]) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn missing_field_error(&self, _field: &'static str) -> Error {
|
||||
fn missing_field_error(&mut self, _field: &'static str) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn unexpected_name_error(&self, _token: de::Token) -> Error {
|
||||
fn unexpected_name_error(&mut self, _token: de::Token) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn conversion_error(&self, _token: de::Token) -> Error {
|
||||
fn conversion_error(&mut self, _token: de::Token) -> Error {
|
||||
SyntaxError
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user