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 <sternenseemann@systemli.org>
This commit is contained in:
parent
7d34e6e880
commit
3b64b7eb2e
1 changed files with 3 additions and 3 deletions
|
@ -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<EvalWarning>,
|
||||
pub errors: Vec<Error>,
|
||||
|
@ -1070,7 +1070,7 @@ pub fn compile(
|
|||
expr: ast::Expr,
|
||||
location: Option<PathBuf>,
|
||||
globals: HashMap<&'static str, Value>,
|
||||
) -> EvalResult<CompilationResult> {
|
||||
) -> EvalResult<CompilationOutput> {
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue