From 2ff94f5308bfc0b61391ce45b4fd8d0dcdbfde26 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 9 Sep 2024 07:10:47 -0400 Subject: [PATCH] Use Fn trait instead of FnMut for callback We don't need the callback to be mutable currently so relax the trait to just be `Fn` instead of `FnMut`. If we have a need for a mutable environment callback in the future we can change this easily enough without any issues. --- crates/circuit/src/dag_circuit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/circuit/src/dag_circuit.rs b/crates/circuit/src/dag_circuit.rs index 072ac4b2e074..766fae7b528a 100644 --- a/crates/circuit/src/dag_circuit.rs +++ b/crates/circuit/src/dag_circuit.rs @@ -6292,10 +6292,10 @@ impl DAGCircuit { &mut self, py: Python, // Unused if cache_pygates isn't enabled node: NodeIndex, - mut insert: F, + insert: F, ) -> PyResult<()> where - F: FnMut(&Wire) -> PyResult, + F: Fn(&Wire) -> PyResult, { let edges: Vec<(NodeIndex, EdgeIndex, Wire)> = self .dag