summaryrefslogtreecommitdiff
path: root/dhall/src/semantics/nze/normalize.rs
diff options
context:
space:
mode:
authorNadrieril2020-11-02 03:47:15 +0000
committerNadrieril2020-11-03 23:18:58 +0000
commit9e8ae42b2742e27a70a7fb8ea79ae21060d43fc1 (patch)
treefadbca8531f19eeafa80550ebd1e62d891a8f3e1 /dhall/src/semantics/nze/normalize.rs
parent055e70f52bb0d8740ce6ac00b98ae856c29642b2 (diff)
Normalize `with` by mutation.
This is Cow-style mutation: we clone only what's shared and then mutate it. This it more legible and more efficient than the immutable version.
Diffstat (limited to '')
-rw-r--r--dhall/src/semantics/nze/normalize.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dhall/src/semantics/nze/normalize.rs b/dhall/src/semantics/nze/normalize.rs
index 3b40fac..62efc5f 100644
--- a/dhall/src/semantics/nze/normalize.rs
+++ b/dhall/src/semantics/nze/normalize.rs
@@ -84,7 +84,7 @@ where
pub type Ret = NirKind;
pub fn ret_nir(x: Nir) -> Ret {
- ret_ref(&x)
+ x.into_kind()
}
pub fn ret_kind(x: NirKind) -> Ret {
x