fix(rust): fix new clippy warnings
This commit is contained in:
parent
149a2a9081
commit
3950dddfde
3 changed files with 5 additions and 5 deletions
|
|
@ -11,6 +11,9 @@ fn main() {
|
|||
println!("cargo:rustc-env=BUILD_SHA={git_sha}");
|
||||
}
|
||||
|
||||
println!("cargo:rustc-check-cfg=cfg(sanitizing)");
|
||||
println!("cargo:rustc-check-cfg=cfg(TREE_SITTER_EMBED_WASM_BINDING)");
|
||||
|
||||
if web_playground_files_present() {
|
||||
println!("cargo:rustc-cfg=TREE_SITTER_EMBED_WASM_BINDING");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -221,10 +221,7 @@ fn test_parsing_text_with_byte_order_mark() {
|
|||
|
||||
// Parse UTF16 text with a BOM
|
||||
let tree = parser
|
||||
.parse_utf16(
|
||||
&"\u{FEFF}fn a() {}".encode_utf16().collect::<Vec<_>>(),
|
||||
None,
|
||||
)
|
||||
.parse_utf16("\u{FEFF}fn a() {}".encode_utf16().collect::<Vec<_>>(), None)
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
tree.root_node().to_sexp(),
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ fn get_changed_ranges(
|
|||
edit: &Edit,
|
||||
) -> Vec<Range> {
|
||||
perform_edit(tree, source_code, edit).unwrap();
|
||||
let new_tree = parser.parse(&source_code, Some(tree)).unwrap();
|
||||
let new_tree = parser.parse(source_code, Some(tree)).unwrap();
|
||||
let result = tree.changed_ranges(&new_tree).collect();
|
||||
*tree = new_tree;
|
||||
result
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue