From ecc5242463308c16f38dbd5015b9f264f990b76a Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Tue, 3 Nov 2020 20:35:22 +0000 Subject: Remove NirInternal --- dhall/src/semantics/nze/lazy.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'dhall/src/semantics/nze/lazy.rs') diff --git a/dhall/src/semantics/nze/lazy.rs b/dhall/src/semantics/nze/lazy.rs index 550f69a..d3b5c8d 100644 --- a/dhall/src/semantics/nze/lazy.rs +++ b/dhall/src/semantics/nze/lazy.rs @@ -63,6 +63,17 @@ where } } +/// This implementation evaluates before cloning, because we can't clone the contents of a `Cell`. +impl Clone for Lazy +where + Src: Eval, + Tgt: Clone, +{ + fn clone(&self) -> Self { + Self::new_completed(self.force().clone()) + } +} + impl Debug for Lazy where Tgt: Debug, -- cgit v1.2.3