Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
dgherzka committed Sep 29, 2023
1 parent 29fa67d commit 517da84
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion c2rust-transpile/src/translator/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4277,7 +4277,10 @@ impl<'c> Translation<'c> {
Ok(self.enum_cast(ty.ctype, enum_decl_id, expr, val, source_ty, target_ty))
} else if target_ty_ctype.is_floating_type() && source_ty_kind.is_bool() {
val.and_then(|x| {
Ok(WithStmts::new_val(mk().cast_expr(mk().cast_expr(x, mk().path_ty(vec!["u8"])), target_ty)))
Ok(WithStmts::new_val(mk().cast_expr(
mk().cast_expr(x, mk().path_ty(vec!["u8"])),
target_ty,
)))
})
} else {
// Other numeric casts translate to Rust `as` casts,
Expand Down

0 comments on commit 517da84

Please sign in to comment.