From c5cdbf4f0741bc5b722847769e1f3f628fb95f6b Mon Sep 17 00:00:00 2001 From: unspeaker Date: Mon, 8 Sep 2025 02:03:38 +0300 Subject: [PATCH] dsl: remove deprecated traits --- dsl/src/dsl.rs | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/dsl/src/dsl.rs b/dsl/src/dsl.rs index 90cbaed..ffdf38c 100644 --- a/dsl/src/dsl.rs +++ b/dsl/src/dsl.rs @@ -9,7 +9,7 @@ use const_panic::PanicFmt; use std::fmt::Debug; pub(crate) use ::{ std::sync::Arc, - std::error::Error, + //std::error::Error, konst::iter::for_each, konst::string::{str_from, str_range, char_indices}, thiserror::Error, @@ -225,27 +225,3 @@ pub(crate) fn ok_flat (x: Option>) -> DslPerhaps { } } }); - -#[deprecated] -/// `T` + [Dsl] -> `Self`. -pub trait FromDsl: Sized { - fn from_dsl (state: &T, dsl: &impl Dsl) -> Perhaps; - fn from_dsl_or (state: &T, dsl: &impl Dsl, err: Box) -> Usually { - Self::from_dsl(state, dsl)?.ok_or(err) - } - fn from_dsl_or_else (state: &T, dsl: &impl Dsl, err: impl Fn()->Box) -> Usually { - Self::from_dsl(state, dsl)?.ok_or_else(err) - } -} - -#[deprecated] -/// `self` + [Dsl] -> `T` -pub trait DslInto { - fn dsl_into (&self, dsl: &impl Dsl) -> Perhaps; - fn dsl_into_or (&self, dsl: &impl Dsl, err: Box) -> Usually { - self.dsl_into(dsl)?.ok_or(err) - } - fn dsl_into_or_else (&self, dsl: &impl Dsl, err: impl Fn()->Box) -> Usually { - self.dsl_into(dsl)?.ok_or_else(err) - } -}