Skip to content

Commit

Permalink
use Const::const_type()
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-q committed Apr 24, 2024
1 parent e90063c commit 047c3a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hugr/src/builder/build_traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ pub trait Dataflow: Container {
let load_n = self
.add_dataflow_op(
ops::LoadConstant {
datatype: op.value().const_type().clone(),
datatype: op.const_type().clone(),
},
// Constant wire from the constant value node
vec![Wire::new(const_node, OutgoingPort::from(0))],
Expand Down
4 changes: 2 additions & 2 deletions hugr/src/ops/constant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Const {
pub fn value(&self) -> &Value {
&self.value
}

/// Returns a reference to the type of this constant.
pub fn const_type(&self) -> Type {
self.value.const_type()
Expand Down Expand Up @@ -321,7 +321,7 @@ impl OpTrait for Const {
}

fn static_output(&self) -> Option<EdgeKind> {
Some(EdgeKind::Const(self.value().const_type()))
Some(EdgeKind::Const(self.const_type()))
}
}

Expand Down

0 comments on commit 047c3a0

Please sign in to comment.