Skip to content

Commit 7aebbc8

Browse files
committed
cargo fmt
1 parent c4d4432 commit 7aebbc8

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

jit/src/instructions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
159159
});
160160
Ok(())
161161
}
162-
_ => Err(JitCompileError::NotSupported)
162+
_ => Err(JitCompileError::NotSupported),
163163
}
164164
}
165165

@@ -223,7 +223,7 @@ impl<'a, 'b> FunctionCompiler<'a, 'b> {
223223
let val = self.stack.pop().ok_or(JitCompileError::BadBytecode)?;
224224
self.store_variable(name.clone(), val)
225225
}
226-
Instruction::LoadConst { value } => { self.load_const(value) }
226+
Instruction::LoadConst { value } => self.load_const(value),
227227
Instruction::ReturnValue => {
228228
let val = self.stack.pop().ok_or(JitCompileError::BadBytecode)?;
229229
if let Some(ref ty) = self.sig.ret {

jit/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,15 +250,16 @@ impl TryFrom<AbiValue> for bool {
250250
fn try_from(value: AbiValue) -> Result<Self, Self::Error> {
251251
match value {
252252
AbiValue::Bool(b) => Ok(b),
253-
_ => Err(())
253+
_ => Err(()),
254254
}
255255
}
256256
}
257257

258258
fn type_check(ty: &JitType, val: &AbiValue) -> Result<(), JitArgumentError> {
259259
match (ty, val) {
260-
(JitType::Int, AbiValue::Int(_)) | (JitType::Float, AbiValue::Float(_)) |
261-
(JitType::Bool, AbiValue::Bool(_)) => Ok(()),
260+
(JitType::Int, AbiValue::Int(_))
261+
| (JitType::Float, AbiValue::Float(_))
262+
| (JitType::Bool, AbiValue::Bool(_)) => Ok(()),
262263
_ => Err(JitArgumentError::ArgumentTypeMismatch),
263264
}
264265
}

jit/tests/bool_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,3 @@ fn test_if_not() {
5050
assert_eq!(if_not(true), Ok(1));
5151
assert_eq!(if_not(false), Ok(0));
5252
}
53-

0 commit comments

Comments
 (0)