refactor(tvix/eval): generalize EvalIO container
Don't restrict to a Box<dyn EvalIO>. There's still one or two places where we do restrict, this will be solved by b/262. Change-Id: Ic8d927d6ea81fa12d90b1e4352f35ffaafbd1adf Reviewed-on: https://cl.tvl.fyi/c/depot/+/10639 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
This commit is contained in:
parent
44d24852c3
commit
e0a867cabf
8 changed files with 74 additions and 48 deletions
|
@ -3,7 +3,7 @@
|
|||
use serde::de::value::{MapDeserializer, SeqDeserializer};
|
||||
use serde::de::{self, EnumAccess, VariantAccess};
|
||||
pub use tvix_eval::Evaluation;
|
||||
use tvix_eval::Value;
|
||||
use tvix_eval::{EvalIO, Value};
|
||||
|
||||
use crate::error::Error;
|
||||
|
||||
|
@ -43,7 +43,7 @@ where
|
|||
pub fn from_str_with_config<'code, T, F>(src: &'code str, config: F) -> Result<T, Error>
|
||||
where
|
||||
T: serde::Deserialize<'code>,
|
||||
F: FnOnce(&mut Evaluation),
|
||||
F: FnOnce(&mut Evaluation<Box<dyn EvalIO>>),
|
||||
{
|
||||
// First step is to evaluate the Nix code ...
|
||||
let mut eval = Evaluation::default();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue