Skip to content

Commit

Permalink
fix: support f32/f64
Browse files Browse the repository at this point in the history
  • Loading branch information
ihciah committed Nov 25, 2024
1 parent 1289164 commit 996eb94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust2go-common/src/raw_file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ typedef struct QueueMeta {
Ok(Node::List(Box::new(type_to_node(inside)?)))
}
"u8" | "u16" | "u32" | "u64" | "usize" | "i8" | "i16" | "i32" | "i64" | "isize"
| "bool" | "char" => Ok(Node::Primitive),
| "bool" | "char" | "f32" | "f64" => Ok(Node::Primitive),
_ => Ok(Node::NamedStruct(seg.ident.clone())),
}
}
Expand Down Expand Up @@ -948,7 +948,7 @@ impl TryFrom<&Type> for ParamType {
let seg = type_to_segment(ty)?;
let param_type_inner = match seg.ident.to_string().as_str() {
"i8" | "i16" | "i32" | "i64" | "u8" | "u16" | "u32" | "u64" | "usize" | "isize"
| "bool" | "char" | "f32" => {
| "bool" | "char" | "f32" | "f64" => {
if !seg.arguments.is_none() {
sbail!("primitive types with arguments are not supported")
}
Expand Down

0 comments on commit 996eb94

Please sign in to comment.