From f5f789540ad7d3f7f4f855c9db69d65cfc190ee0 Mon Sep 17 00:00:00 2001 From: Sophie Forrest Date: Fri, 30 Aug 2024 23:35:45 +1200 Subject: feat(engine): allow choosing engine per executor call --- src/main.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index 5412735..f5c4740 100644 --- a/src/main.rs +++ b/src/main.rs @@ -79,7 +79,10 @@ use std::path::PathBuf; -use brainf_rs::utility::{execute_from_file, execute_from_str}; +use brainf_rs::{ + executor, + utility::{execute_from_file, execute_from_str}, +}; use clap::{Parser, Subcommand}; use miette::Context; @@ -116,9 +119,10 @@ fn main() -> miette::Result<()> { match app.command { Command::File { ref path } => { - execute_from_file(path, &mut tape).wrap_err("when executing from file")?; + execute_from_file::(path, &mut tape) + .wrap_err("when executing from file")?; } - Command::Text { ref input } => execute_from_str(input, &mut tape)?, + Command::Text { ref input } => execute_from_str::(input, &mut tape)?, }; Ok(()) -- cgit 1.4.1