diff --git a/src/roxy.rs b/src/roxy.rs index f6d835e..a4264da 100644 --- a/src/roxy.rs +++ b/src/roxy.rs @@ -10,6 +10,12 @@ 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) + } +} + pub trait AndThenParser

{ fn and_then(&mut self, parser: P) -> &Self; }