Skip to content

Commit

Permalink
tidy up literal prefix handling
Browse files Browse the repository at this point in the history
  • Loading branch information
exrook committed Nov 18, 2023
1 parent e73dc56 commit f150a6a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions autogen/src/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ fn get_decode_method(kind: &str) -> Ident {
return as_ident("id");
}

let mut kind = kind;
if kind.starts_with("Literal") {
kind = &kind["Literal".len()..];
if let Some(kind) = kind.strip_prefix("Literal") {
if kind == "Integer" || kind == "Float" {
return as_ident("bit32");
}
Expand Down

0 comments on commit f150a6a

Please sign in to comment.