mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 14:57:59 +00:00
feat(errors): Switch Error::custom to use Into<String>
This commit is contained in:
@@ -10,11 +10,11 @@ use serde::bytes::{ByteBuf, Bytes};
|
||||
struct Error;
|
||||
|
||||
impl serde::ser::Error for Error {
|
||||
fn custom(_: String) -> Error { Error }
|
||||
fn custom<T: Into<String>>(_: T) -> Error { Error }
|
||||
}
|
||||
|
||||
impl serde::de::Error for Error {
|
||||
fn custom(_: String) -> Error { Error }
|
||||
fn custom<T: Into<String>>(_: T) -> Error { Error }
|
||||
|
||||
fn end_of_stream() -> Error { Error }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user