From 88621847854edac61701542bd256ead8d2fb661a Mon Sep 17 00:00:00 2001 From: kalzoo <22137047+kalzoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:43:00 -0800 Subject: [PATCH 1/2] fix: lifetimes in Program#get_frames_for_instruction --- quil-rs/src/program/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quil-rs/src/program/mod.rs b/quil-rs/src/program/mod.rs index e8f18333..1d0926b7 100644 --- a/quil-rs/src/program/mod.rs +++ b/quil-rs/src/program/mod.rs @@ -285,10 +285,10 @@ impl Program { /// /// See the [Quil-T spec](https://github.com/quil-lang/quil/blob/master/rfcs/analog/proposal.md) /// for more information. - pub fn get_frames_for_instruction<'a>( - &'a self, - instruction: &'a Instruction, - ) -> Option> { + pub fn get_frames_for_instruction<'i, 'p>( + &'p self, + instruction: &'i Instruction, + ) -> Option> { let qubits_used_by_program = self.get_used_qubits(); instruction From 6c5d96adf6fa65fd4c4f58445c713c8c989017f2 Mon Sep 17 00:00:00 2001 From: kalzoo <22137047+kalzoo@users.noreply.github.com> Date: Wed, 17 Jan 2024 10:57:40 -0800 Subject: [PATCH 2/2] feat: derive Default for MatchedFrames --- quil-rs/src/program/frame.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quil-rs/src/program/frame.rs b/quil-rs/src/program/frame.rs index 8dc7a35b..0fe62b12 100644 --- a/quil-rs/src/program/frame.rs +++ b/quil-rs/src/program/frame.rs @@ -211,7 +211,7 @@ pub(crate) struct FrameMatchConditions<'a> { } /// The product of evaluating [`FrameMatchConditions`] in the scope of available frames (such as within a [`crate::Program`]). -#[derive(Debug)] +#[derive(Debug, Default)] pub struct MatchedFrames<'a> { /// Which concrete frames are blocked and not used. /// This set is mutually exclusive with `used`.