Skip to content

Commit 94d7dc0

Browse files
committed
Fix build with --no-default-features
1 parent e3c880c commit 94d7dc0

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

crates/wasmparser/src/readers/core/elements.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ impl<'a> FromReader<'a> for Element<'a> {
123123
let mut allocs = OperatorsReaderAllocations::default();
124124
if exprs {
125125
for _ in 0..items_count {
126-
let mut ops = OperatorsReader::new(reader.clone(), std::mem::take(&mut allocs));
126+
let mut ops =
127+
OperatorsReader::new(reader.clone(), core::mem::take(&mut allocs));
127128
ops.skip_const_expr()?;
128129
*reader = ops.get_binary_reader();
129130
allocs = ops.into_allocations();

crates/wasmparser/src/readers/core/operators.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ macro_rules! define_visit_operator_stack_adapter {
10141014
impl<'x, 'a, T: VisitOperator<'a>> VisitOperator<'a> for FrameStackAdapter<'x, 'a, T> {
10151015
type Output = T::Output;
10161016

1017+
#[cfg(feature = "simd")]
10171018
fn simd_visitor(&mut self) -> Option<&mut dyn VisitSimdOperator<'a, Output = Self::Output>> {
10181019
self.visitor.simd_visitor()
10191020
}
@@ -1034,6 +1035,7 @@ macro_rules! define_passthrough_visit_operator {
10341035
impl<'x, 'a, T: VisitOperator<'a>> VisitOperator<'a> for SingleFrameAdapter<'x, 'a, T> {
10351036
type Output = T::Output;
10361037

1038+
#[cfg(feature = "simd")]
10371039
fn simd_visitor(&mut self) -> Option<&mut dyn VisitSimdOperator<'a, Output = Self::Output>> {
10381040
self.visitor.simd_visitor()
10391041
}

0 commit comments

Comments
 (0)