diff --git a/src/roxy.rs b/src/roxy.rs index a4264da..bd80992 100644 --- a/src/roxy.rs +++ b/src/roxy.rs @@ -8,16 +8,16 @@ use crate::error::Error; pub trait Parse { fn parse(&mut self, path: &str, src: &[u8], dst: &mut Vec) -> Result<(), Error>; -} -impl<'a, P: Parse + 'static> Into> for (P,) { - fn into(self) -> Box { - Box::new(self.0) + fn as_dyn(&self) -> &dyn Parse where Self: Sized { + self } } -pub trait AndThenParser

{ - fn and_then(&mut self, parser: P) -> &Self; +impl Into> for (P,) { + fn into(self) -> Box { + Box::new(self.0) + } } pub struct Parser<'a> {