1
1
mirror of https://github.com/tweag/nickel.git synced 2024-09-20 16:08:14 +03:00

Fix substitution for interpolated expressions

This commit is contained in:
Yann Hamdaoui 2020-11-16 11:42:15 +01:00
parent 7faabeceb3
commit e6378deefc

View File

@ -637,12 +637,10 @@ fn subst(rt: RichTerm, global_env: &Environment, env: &Environment) -> RichTerm
.into_iter()
.map(|chunk| match chunk {
chunk @ StrChunk::Literal(_) => chunk,
StrChunk::Expr(t) => StrChunk::Expr(subst_(
t,
global_env,
env,
Cow::Borrowed(bound.as_ref()),
)),
StrChunk::Expr(t, indent) => StrChunk::Expr(
subst_(t, global_env, env, Cow::Borrowed(bound.as_ref())),
indent,
),
})
.collect();