aboutsummaryrefslogtreecommitdiff
path: root/helix-syntax
diff options
context:
space:
mode:
authorNathan Vegdahl2021-07-24 00:23:16 +0000
committerNathan Vegdahl2021-07-24 00:23:16 +0000
commit43594049ddd6b0ec3794807016ab3cd2a6a38834 (patch)
tree56e0bd5b7ac016937612aa650de2f06041a2e258 /helix-syntax
parent427ae6ac6cfdd2a89580692dadd45f1a8dc02d2c (diff)
parentbda4f5c1cdd2f84a06647f7dce45a8f6d06401ae (diff)
Merge branch 'master' into great_line_ending_and_cursor_range_cleanup
Diffstat (limited to 'helix-syntax')
-rw-r--r--helix-syntax/src/lib.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/helix-syntax/src/lib.rs b/helix-syntax/src/lib.rs
index b6c0ecf3..b0ec48d8 100644
--- a/helix-syntax/src/lib.rs
+++ b/helix-syntax/src/lib.rs
@@ -3,15 +3,7 @@ use libloading::{Library, Symbol};
use tree_sitter::Language;
fn replace_dashes_with_underscores(name: &str) -> String {
- let mut result = String::with_capacity(name.len());
- for c in name.chars() {
- if c == '-' {
- result.push('_');
- } else {
- result.push(c);
- }
- }
- result
+ name.replace('-', "_")
}
#[cfg(unix)]
const DYLIB_EXTENSION: &str = "so";