mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-10-31 07:39:49 +00:00
feat(de): Rename de::Error trait methods
This commit is contained in:
1 parent
6caf8a0074
commit
118476b98b
11 files changed
+83
-79
No files matched your search
@@ -10,19 +10,13 @@ use serde::bytes::{ByteBuf, Bytes};
|
||||
struct Error;
|
||||
|
||||
impl serde::ser::Error for Error {
|
||||
fn syntax(_: &str) -> Error { Error }
|
||||
|
||||
fn invalid_value(_field: &str) -> Error { Error }
|
||||
fn custom(_: String) -> Error { Error }
|
||||
}
|
||||
|
||||
impl serde::de::Error for Error {
|
||||
fn syntax(_: &str) -> Error { Error }
|
||||
fn custom(_: String) -> Error { Error }
|
||||
|
||||
fn end_of_stream() -> Error { Error }
|
||||
|
||||
fn unknown_field(_field: &str) -> Error { Error }
|
||||
|
||||
fn missing_field(_field: &'static str) -> Error { Error }
|
||||
}
|
||||
|
||||
impl fmt::Display for Error {
|
||||
|
||||
@@ -416,7 +416,7 @@ pub enum Error {
|
||||
}
|
||||
|
||||
impl ser::Error for Error {
|
||||
fn syntax(_: &str) -> Error { Error::SyntaxError }
|
||||
fn custom(_: String) -> Error { Error::SyntaxError }
|
||||
|
||||
fn invalid_value(msg: &str) -> Error {
|
||||
Error::InvalidValue(msg.to_owned())
|
||||
@@ -424,7 +424,7 @@ impl ser::Error for Error {
|
||||
}
|
||||
|
||||
impl de::Error for Error {
|
||||
fn syntax(_: &str) -> Error { Error::SyntaxError }
|
||||
fn custom(_: String) -> Error { Error::SyntaxError }
|
||||
|
||||
fn end_of_stream() -> Error { Error::EndOfStreamError }
|
||||
|
||||
|
||||
Reference in new issue
Block a user