From 905c3fce02d84cc59f39fd1bea000dc2a0e4b495 Mon Sep 17 00:00:00 2001 From: Yaroslav Bolyukin Date: Mon, 23 Mar 2026 05:35:06 +0000 Subject: [PATCH] refactor: drop IntoUntyped for Thunk Unnecessarily reallocates... I wish we had specialization... --- --- a/crates/jrsonnet-evaluator/src/typed/conversions.rs +++ b/crates/jrsonnet-evaluator/src/typed/conversions.rs @@ -127,19 +127,16 @@ const TYPE: &'static ComplexValType = &ComplexValType::Lazy(T::TYPE); } -impl IntoUntyped for Thunk -where - T: Typed + IntoUntyped + Trace + Clone, -{ +impl IntoUntyped for Thunk { fn into_untyped(typed: Self) -> Result { - T::into_untyped(typed.evaluate()?) + typed.evaluate() } fn provides_lazy() -> bool { true } fn into_lazy_untyped(inner: Self) -> Thunk { - inner.map(>::default()) + inner } } -- gitstuff