Skip to content

Commit eb83b72

Browse files
MannarAmuthanyouknowone
authored andcommitted
Formatted code files
1 parent b69e6a9 commit eb83b72

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

jit/src/instructions.rs

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -315,24 +315,22 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
315315
let b = self.stack.pop().ok_or(JitCompileError::BadBytecode)?;
316316
let a = self.stack.pop().ok_or(JitCompileError::BadBytecode)?;
317317

318-
let a_type:Option<JitType> = a.to_jit_type();
319-
let b_type:Option<JitType> = b.to_jit_type();
318+
let a_type: Option<JitType> = a.to_jit_type();
319+
let b_type: Option<JitType> = b.to_jit_type();
320320

321321
match (a, b) {
322-
(JitValue::Int(a), JitValue::Int(b)) |
323-
(JitValue::Bool(a), JitValue::Bool(b)) |
324-
(JitValue::Bool(a), JitValue::Int(b)) |
325-
(JitValue::Int(a), JitValue::Bool(b))
326-
=> {
327-
322+
(JitValue::Int(a), JitValue::Int(b))
323+
| (JitValue::Bool(a), JitValue::Bool(b))
324+
| (JitValue::Bool(a), JitValue::Int(b))
325+
| (JitValue::Int(a), JitValue::Bool(b)) => {
328326
let operand_one = match a_type.unwrap() {
329327
JitType::Bool => self.builder.ins().uextend(types::I64, a),
330-
_=> a
328+
_ => a,
331329
};
332330

333331
let operand_two = match b_type.unwrap() {
334332
JitType::Bool => self.builder.ins().uextend(types::I64, b),
335-
_=> b
333+
_ => b,
336334
};
337335

338336
let cond = match op {

jit/tests/bool_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ fn test_gte() {
156156
assert_eq!(gte(true, false), Ok(1));
157157
}
158158

159-
160159
#[test]
161160
fn test_gte_with_integers() {
162161
let gte = jit_function! { gte(a:bool, b:i64) -> i64 => r##"

0 commit comments

Comments
 (0)