diff --git a/jit/src/instructions.rs b/jit/src/instructions.rs index 2959361a0..ef099026e 100644 --- a/jit/src/instructions.rs +++ b/jit/src/instructions.rs @@ -315,24 +315,22 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> { let b = self.stack.pop().ok_or(JitCompileError::BadBytecode)?; let a = self.stack.pop().ok_or(JitCompileError::BadBytecode)?; - let a_type:Option = a.to_jit_type(); - let b_type:Option = b.to_jit_type(); + let a_type: Option = a.to_jit_type(); + let b_type: Option = b.to_jit_type(); match (a, b) { - (JitValue::Int(a), JitValue::Int(b)) | - (JitValue::Bool(a), JitValue::Bool(b)) | - (JitValue::Bool(a), JitValue::Int(b)) | - (JitValue::Int(a), JitValue::Bool(b)) - => { - + (JitValue::Int(a), JitValue::Int(b)) + | (JitValue::Bool(a), JitValue::Bool(b)) + | (JitValue::Bool(a), JitValue::Int(b)) + | (JitValue::Int(a), JitValue::Bool(b)) => { let operand_one = match a_type.unwrap() { JitType::Bool => self.builder.ins().uextend(types::I64, a), - _=> a + _ => a, }; let operand_two = match b_type.unwrap() { JitType::Bool => self.builder.ins().uextend(types::I64, b), - _=> b + _ => b, }; let cond = match op { diff --git a/jit/tests/bool_tests.rs b/jit/tests/bool_tests.rs index 26afb9778..191993938 100644 --- a/jit/tests/bool_tests.rs +++ b/jit/tests/bool_tests.rs @@ -156,7 +156,6 @@ fn test_gte() { assert_eq!(gte(true, false), Ok(1)); } - #[test] fn test_gte_with_integers() { let gte = jit_function! { gte(a:bool, b:i64) -> i64 => r##"