mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2025-06-29 12:14:34 +02:00
13 lines
311 B
Rust
13 lines
311 B
Rust
use std::fmt::Display;
|
|
|
|
use serde::{de, ser};
|
|
|
|
use crate::Error;
|
|
|
|
impl de::Error for Error {
|
|
fn custom<T: Display + ToString>(msg: T) -> Self { Self::SerdeDe(msg.to_string().into()) }
|
|
}
|
|
|
|
impl ser::Error for Error {
|
|
fn custom<T: Display + ToString>(msg: T) -> Self { Self::SerdeSer(msg.to_string().into()) }
|
|
}
|