Skip to content

Commit 3e6ec6c

Browse files
committed
Fix miri
1 parent 21d5f12 commit 3e6ec6c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

engine/src/types.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,10 @@ macro_rules! declare_types {
331331
impl From<RhsValue> for RhsValues {
332332
fn from(rhs: RhsValue) -> Self {
333333
match rhs {
334-
$(RhsValue::$name(rhs) => RhsValues::$name(vec![rhs.into()]),)*
334+
$(RhsValue::$name(rhs) => {
335+
#[allow(unreachable_code)]
336+
RhsValues::$name(vec![rhs.into()])
337+
})*
335338
}
336339
}
337340
}
@@ -341,7 +344,10 @@ macro_rules! declare_types {
341344
pub fn push(&mut self, rhs: RhsValue) -> Result<(), TypeMismatchError> {
342345
match self {
343346
$(RhsValues::$name(vec) => match rhs {
344-
RhsValue::$name(rhs) => Ok(vec.push(rhs.into())),
347+
RhsValue::$name(rhs) => {
348+
#[allow(unreachable_code)]
349+
Ok(vec.push(rhs.into()))
350+
}
345351
_ => Err(TypeMismatchError {
346352
expected: self.get_type().into(),
347353
actual: rhs.get_type(),

0 commit comments

Comments
 (0)