From 3b64b7eb2ec178c11056d1e361def5b5b965ba43 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 26 Aug 2022 20:17:40 +0300 Subject: refactor(tvix/eval): rename CompilationResult -> CompilationOutput grfn pointed out in cl/6174 that `Result` might cause developers to believe that this behaves like std::Result, which it does not. Change-Id: Ia30ab0dcb7e8da7bf842777ee3fe17bcf35cb0c1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/6281 Tested-by: BuildkiteCI Reviewed-by: sterni --- tvix/eval/src/compiler/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tvix/eval/src/compiler') diff --git a/tvix/eval/src/compiler/mod.rs b/tvix/eval/src/compiler/mod.rs index d40cb1e14e..69e661d46f 100644 --- a/tvix/eval/src/compiler/mod.rs +++ b/tvix/eval/src/compiler/mod.rs @@ -29,7 +29,7 @@ use crate::warnings::{EvalWarning, WarningKind}; /// Represents the result of compiling a piece of Nix code. If /// compilation was successful, the resulting bytecode can be passed /// to the VM. -pub struct CompilationResult { +pub struct CompilationOutput { pub lambda: Lambda, pub warnings: Vec, pub errors: Vec, @@ -1070,7 +1070,7 @@ pub fn compile( expr: ast::Expr, location: Option, globals: HashMap<&'static str, Value>, -) -> EvalResult { +) -> EvalResult { let mut root_dir = match location { Some(dir) => Ok(dir), None => std::env::current_dir().map_err(|e| { @@ -1095,7 +1095,7 @@ pub fn compile( c.compile(expr); - Ok(CompilationResult { + Ok(CompilationOutput { lambda: c.contexts.pop().unwrap().lambda, warnings: c.warnings, errors: c.errors, -- cgit 1.4.1