nyar-error 0.1.17

Error types for valkyrie language
Documentation
use std::fmt::Display;

use crate::NyarError;

impl serde::ser::Error for NyarError {
    fn custom<T>(msg: T) -> Self
    where
        T: Display,
    {
        NyarError::runtime_error(msg.to_string())
    }
}

impl serde::de::Error for NyarError {
    fn custom<T>(msg: T) -> Self
    where
        T: Display,
    {
        NyarError::runtime_error(msg.to_string())
    }
}