Skip to content

Commit

Permalink
Review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
aborgna-q committed Mar 18, 2024
1 parent 1b6faa5 commit fd363fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions quantinuum-hugr/src/ops/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ pub use custom::{downcast_equal_consts, CustomConst, CustomSerialized};
#[serde(tag = "c")]
pub enum Const {
/// An extension constant value, that can check it is of a given [CustomType].
///
// Note: the extra level of tupling is to avoid https://github.com/rust-lang/rust/issues/78808
Extension {
/// The custom constant value.
e: ExtensionConst,
Expand Down
4 changes: 2 additions & 2 deletions quantinuum-hugr/src/types/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ impl super::SumType {
})?;
}

for (i, (t, v)) in itertools::zip_eq(variant.iter(), val.iter()).enumerate() {
for (index, (t, v)) in itertools::zip_eq(variant.iter(), val.iter()).enumerate() {
if v.const_type() != *t {
Err(SumTypeError::InvalidValueType {
tag,
index: i,
index,
expected: t.clone(),
found: v.clone(),
})?;
Expand Down

0 comments on commit fd363fb

Please sign in to comment.