Skip to content

Commit

Permalink
chore: Use char instead of string
Browse files Browse the repository at this point in the history
This addresses a lint that suggested using a char for a single character
rather than a string with replace
  • Loading branch information
afnanenayet committed May 22, 2024
1 parent 70a3d9f commit 650f74d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ fn lib_name_from_lang(lang: &str) -> String {
} else {
panic!("Dynamic libraries are not supported for this platform.");
};
format!("libtree-sitter-{}.{}", lang.replace("_", "-"), extension)
format!("libtree-sitter-{}.{}", lang.replace('_', "-"), extension)
}

/// Create a tree sitter [Language] from a shared library object.
Expand Down

0 comments on commit 650f74d

Please sign in to comment.