diff options
Diffstat (limited to '')
| -rw-r--r-- | src/utility.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utility.rs b/src/utility.rs index a903273..58ac3e2 100644 --- a/src/utility.rs +++ b/src/utility.rs @@ -2,7 +2,7 @@ use std::path::Path; -use crate::{constants::TapeInner, execute, lex, parse, Error}; +use crate::{constants::TapeInner, lex, parse, Error, Executor}; /// Utility function to execute a Brainfuck file. Lexes, parses and executes the /// input file. @@ -21,7 +21,7 @@ pub fn execute_from_file(path: impl AsRef<Path>, tape: &mut [TapeInner]) -> Resu let mut data_pointer = 0; - execute(&instructions, tape, &mut data_pointer)?; + Executor::execute(&instructions, tape, &mut data_pointer)?; Ok(()) } @@ -41,7 +41,7 @@ pub fn execute_from_str(input: &str, tape: &mut [TapeInner]) -> Result<(), Error let mut data_pointer = 0; - execute(&instructions, tape, &mut data_pointer)?; + Executor::execute(&instructions, tape, &mut data_pointer)?; Ok(()) } |