From 4d50a1d2870245dfae18a48b984cbccaa2183cd4 Mon Sep 17 00:00:00 2001 From: KitsuneCafe <10284516+kitsunecafe@users.noreply.github.com> Date: Sun, 4 Feb 2024 18:54:05 -0500 Subject: [PATCH] add into :3c --- src/roxy.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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; }