Skip to content

Commit

Permalink
Fix generated constants: f64::INFINITY, f64::NEG_ INFINITY, `f64:…
Browse files Browse the repository at this point in the history
…:NAN`

#2853
  • Loading branch information
Gabi Ganam committed Jun 25, 2024
1 parent 1078f1b commit 9c7b404
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion bindgen/codegen/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ pub(crate) mod ast_ty {
}

pub(crate) fn float_expr(
ctx: &BindgenContext,
f: f64,
) -> Result<TokenStream, ()> {
if f.is_finite() {
Expand Down
2 changes: 1 addition & 1 deletion bindgen/codegen/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ impl CodeGenerator for Var {
}
}
VarType::Float(f) => {
if let Ok(expr) = helpers::ast_ty::float_expr(ctx, f) {
if let Ok(expr) = helpers::ast_ty::float_expr(f) {
result.push(quote! {
#(#attrs)*
pub const #canonical_ident : #ty = #expr ;
Expand Down

0 comments on commit 9c7b404

Please sign in to comment.