From 0610f6a103b5c074d462454f10a35f42e7ca773f Mon Sep 17 00:00:00 2001 From: Seyon Sivarajah Date: Tue, 9 Jul 2024 10:51:29 +0100 Subject: [PATCH] clone input --- hugr-cli/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hugr-cli/src/lib.rs b/hugr-cli/src/lib.rs index 07982b589..9466cdb8d 100644 --- a/hugr-cli/src/lib.rs +++ b/hugr-cli/src/lib.rs @@ -47,7 +47,7 @@ pub const VALID_PRINT: &str = "HUGR valid!"; impl CmdLineArgs { /// Run the HUGR cli and validate against an extension registry. pub fn run(&self, registry: &ExtensionRegistry) -> Result { - let mut hugr: Hugr = serde_json::from_reader(self.input.into_reader()?)?; + let mut hugr: Hugr = serde_json::from_reader(self.input.clone().into_reader()?)?; if self.mermaid { println!("{}", hugr.mermaid_string()); }