diff --git a/Cargo.lock b/Cargo.lock index b98d7afe..8e3c33e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1148,7 +1148,7 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quil-cli" -version = "0.6.1" +version = "0.6.2-rc.1" dependencies = [ "anyhow", "clap", @@ -1157,7 +1157,7 @@ dependencies = [ [[package]] name = "quil-py" -version = "0.13.1" +version = "0.13.2-rc.1" dependencies = [ "indexmap", "ndarray", @@ -1172,7 +1172,7 @@ dependencies = [ [[package]] name = "quil-rs" -version = "0.29.1" +version = "0.29.2-rc.1" dependencies = [ "approx", "clap", diff --git a/quil-rs/src/instruction/extern_call.rs b/quil-rs/src/instruction/extern_call.rs index ab100e2c..bc4306e1 100644 --- a/quil-rs/src/instruction/extern_call.rs +++ b/quil-rs/src/instruction/extern_call.rs @@ -299,7 +299,7 @@ pub struct ExternSignatureMap(IndexMap); impl TryFrom for ExternSignatureMap { /// The error type for converting an [`ExternPragmaMap`] to an [`ExternSignatureMap`] includes /// the offending [`Pragma`] instruction and the error that occurred. - type Error = (Pragma, ExternError); + type Error = (Box, ExternError); fn try_from(value: ExternPragmaMap) -> Result { Ok(ExternSignatureMap( @@ -311,12 +311,12 @@ impl TryFrom for ExternSignatureMap { Some(name) => { validate_user_identifier(name.as_str()) .map_err(ExternError::from) - .map_err(|error| (value.clone(), error))?; + .map_err(|error| (Box::new(value.clone()), error))?; let signature = ExternSignature::try_from(value.clone()) - .map_err(|error| (value, error))?; + .map_err(|error| (Box::new(value), error))?; Ok((name, signature)) } - _ => Err((value, ExternError::NoName)), + _ => Err((Box::new(value), ExternError::NoName)), } }) .collect::>()?, diff --git a/quil-rs/src/program/mod.rs b/quil-rs/src/program/mod.rs index 6b1366a6..a95293ad 100644 --- a/quil-rs/src/program/mod.rs +++ b/quil-rs/src/program/mod.rs @@ -765,7 +765,7 @@ impl Program { /// with the offending [`Pragma`]. pub fn try_extern_signature_map_from_pragma_map( &self, - ) -> std::result::Result { + ) -> std::result::Result, ExternError)> { ExternSignatureMap::try_from(self.extern_pragma_map.clone()) } } diff --git a/quil-rs/src/program/scheduling/graph.rs b/quil-rs/src/program/scheduling/graph.rs index 878524a2..337b5d43 100644 --- a/quil-rs/src/program/scheduling/graph.rs +++ b/quil-rs/src/program/scheduling/graph.rs @@ -307,7 +307,7 @@ impl<'a> ScheduledBasicBlock<'a> { let extern_signature_map = ExternSignatureMap::try_from(program.extern_pragma_map.clone()) .map_err(|(pragma, _)| ScheduleError { instruction_index: None, - instruction: Instruction::Pragma(pragma), + instruction: Instruction::Pragma(*pragma), variant: ScheduleErrorVariant::Extern, })?; for (index, &instruction) in basic_block.instructions().iter().enumerate() {