Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
siefkenj committed Jan 13, 2024
1 parent 3e7d11f commit 8cf9ae3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/rename.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,4 @@ fn test_quote_non_identifiers() {
};

assert_eq!(NonIdentifierRenameEnum::DECL, expected);
}
}
4 changes: 3 additions & 1 deletion tsify-macros/src/typescript.rs
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,9 @@ fn parse_len(expr: &syn::Expr) -> Option<usize> {
}

fn is_js_ident(string: &str) -> bool {
!string.is_empty() && !string.starts_with(|c: char| c.is_ascii_digit()) && !string.contains(|c: char| !c.is_ascii_alphanumeric() && c != '_' && c != '$')
!string.is_empty()
&& !string.starts_with(|c: char| c.is_ascii_digit())
&& !string.contains(|c: char| !c.is_ascii_alphanumeric() && c != '_' && c != '$')
}

impl TsTypeElement {
Expand Down

0 comments on commit 8cf9ae3

Please sign in to comment.