diff options
Diffstat (limited to 'tvix')
-rw-r--r-- | tvix/eval/src/eval.rs | 2 | ||||
-rw-r--r-- | tvix/eval/src/value.rs | 6 | ||||
-rw-r--r-- | tvix/eval/src/vm.rs | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/tvix/eval/src/eval.rs b/tvix/eval/src/eval.rs index efa016ca9846..9d3f993ba273 100644 --- a/tvix/eval/src/eval.rs +++ b/tvix/eval/src/eval.rs @@ -1,7 +1,7 @@ use rnix::{self, types::TypedNode}; use std::fmt::Write; -use crate::errors::{Error, EvalResult}; +use crate::errors::EvalResult; pub fn interpret(code: String) -> EvalResult<String> { let ast = rnix::parse(&code); diff --git a/tvix/eval/src/value.rs b/tvix/eval/src/value.rs index 842d561d67a6..699c7de7bcdd 100644 --- a/tvix/eval/src/value.rs +++ b/tvix/eval/src/value.rs @@ -39,9 +39,3 @@ impl Value { } } } - -#[derive(Clone, Copy, Debug, PartialEq)] -pub enum NumberPair { - Floats(f64, f64), - Integer(i64, i64), -} diff --git a/tvix/eval/src/vm.rs b/tvix/eval/src/vm.rs index 7b7834c650c6..6841ac4706b3 100644 --- a/tvix/eval/src/vm.rs +++ b/tvix/eval/src/vm.rs @@ -5,7 +5,7 @@ use crate::{ chunk::Chunk, errors::{Error, EvalResult}, opcode::OpCode, - value::{NumberPair, Value}, + value::Value, }; pub struct VM { @@ -123,6 +123,12 @@ impl VM { } } +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum NumberPair { + Floats(f64, f64), + Integer(i64, i64), +} + pub fn run_chunk(chunk: Chunk) -> EvalResult<Value> { let mut vm = VM { chunk, |