From cf2c0af0d596ff53691b9df10d1f7c6572168b23 Mon Sep 17 00:00:00 2001 From: KitsuneCafe <10284516+kitsunecafe@users.noreply.github.com> Date: Sun, 4 Feb 2024 16:41:12 -0500 Subject: [PATCH] make Parser::push more flexible --- src/roxy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/roxy.rs b/src/roxy.rs index 60c2cd7..f6d835e 100644 --- a/src/roxy.rs +++ b/src/roxy.rs @@ -23,8 +23,8 @@ impl<'a> Parser<'a> { Parser { steps: Vec::new() } } - pub fn push(&mut self, parser: &'a mut P) { - self.steps.push(parser); + pub fn push>(&mut self, parser: P) { + self.steps.push(parser.into()); } }