Skip to content

Commit 5d1980e

Browse files
committed
Better readability.
1 parent 48017dc commit 5d1980e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/loader/dag/const_collapse.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ fn recursive_constant_collapse(
5050
const_block_inputs.clone(),
5151
);
5252
if has_constant {
53-
// Call the user-provided processor to potentially modify the input constants.
53+
// Call the user-provided processor to potentially mark constants to be collapsed.
5454
processor(operator, input_constants);
5555

56-
// Collapse any inputs that were marked for collapsing.
56+
// Collapse any inputs that were marked.
5757
for (input, maybe_const) in node.inputs.iter_mut().zip(input_constants) {
5858
if let MaybeConstant::ReferenceConstant {
5959
value,
@@ -149,7 +149,7 @@ impl ConstantInputFinder {
149149
// This refers to the input of the block, we need to check if it's a constant.
150150
const_block_inputs.get(&origin.output_idx).cloned()
151151
}
152-
Operation::WASMOp(op) => op.try_into().ok(),
152+
Operation::WASMOp(op) => WasmValue::try_from(op).ok(),
153153
_ => None,
154154
}
155155
.map_or(MaybeConstant::NonConstant, |value| {

0 commit comments

Comments
 (0)