From 55b54052aa2a051ad7a3de2192d2ee9633a40501 Mon Sep 17 00:00:00 2001 From: Cobord Date: Thu, 14 Mar 2024 15:13:03 -0400 Subject: [PATCH] for exposing operation name todo in circuit/command.rs --- tket2/src/ops.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tket2/src/ops.rs b/tket2/src/ops.rs index 84f33540..1f94b9dc 100644 --- a/tket2/src/ops.rs +++ b/tket2/src/ops.rs @@ -70,6 +70,13 @@ pub enum Tk2Op { Reset, } +impl Tk2Op { + #[allow(dead_code)] + fn exposed_name(&self) -> smol_str::SmolStr { + >::into(*self).name() + } +} + /// Whether an op is a given Tk2Op. pub fn op_matches(op: &OpType, tk2op: Tk2Op) -> bool { op.name() == >::into(tk2op).name()