From c16d2d41477f8804addcb92475e469c2b850f186 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bennet=20Ble=C3=9Fmann?= Date: Sat, 3 Aug 2024 20:04:16 +0200 Subject: [PATCH] fix compilation for 1.77 --- src/machine/preprocessor.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/machine/preprocessor.rs b/src/machine/preprocessor.rs index b4effba3..4c9c412e 100644 --- a/src/machine/preprocessor.rs +++ b/src/machine/preprocessor.rs @@ -38,10 +38,11 @@ fn setup_op_decl(mut terms: Vec, atom_tbl: &AtomTable) -> Result match u16::try_from(bi.get_num()) { + // once msrv is >= 1.78 we can remove the ref and the clone of term below + ref term @ Term::Literal(_, Literal::Fixnum(bi)) => match u16::try_from(bi.get_num()) { Ok(n) if n <= 1200 => n, _ => { - return Err(CompilationError::InvalidOpDeclPrec(term)); + return Err(CompilationError::InvalidOpDeclPrec(term.clone())); } }, other => { -- 2.54.0