Skip to content

Commit 4287cb2

Browse files
renovate[bot]fohte-bot[bot]fohte
authored
deps: update rust crate tree-sitter to v0.26.5 (#16)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: fohte-bot[bot] <139195068+fohte-bot[bot]@users.noreply.github.com> Co-authored-by: Hayato Kawai <fohte.hk@gmail.com>
1 parent 2dca446 commit 4287cb2

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ serde_json = "=1.0.149"
3232
sha2 = "=0.10.9"
3333
shlex = "=1.3.0"
3434
thiserror = "=2.0.18"
35-
tree-sitter = "=0.25.10"
35+
tree-sitter = "=0.26.5"
3636
tree-sitter-bash = "=0.25.1"
3737

3838
[features]

src/rules/command_parser.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ fn collect_commands(node: tree_sitter::Node, source: &[u8], commands: &mut Vec<S
272272
if node.field_name_for_child(i as u32) == Some("value") {
273273
continue;
274274
}
275-
if let Some(child) = node.child(i)
275+
if let Some(child) = node.child(i as u32)
276276
&& child.is_named()
277277
{
278278
collect_commands(child, source, commands);
@@ -290,7 +290,7 @@ fn collect_commands(node: tree_sitter::Node, source: &[u8], commands: &mut Vec<S
290290
}
291291
for i in 0..node.child_count() {
292292
if node.field_name_for_child(i as u32) == Some("redirect")
293-
&& let Some(child) = node.child(i)
293+
&& let Some(child) = node.child(i as u32)
294294
{
295295
collect_substitutions_recursive(child, source, commands);
296296
}
@@ -318,7 +318,7 @@ fn collect_commands(node: tree_sitter::Node, source: &[u8], commands: &mut Vec<S
318318
// command_substitution nodes, and emit the remaining text.
319319
"command" => {
320320
for i in 0..node.child_count() {
321-
let Some(child) = node.child(i) else {
321+
let Some(child) = node.child(i as u32) else {
322322
continue;
323323
};
324324
if !child.is_named() {
@@ -345,7 +345,7 @@ fn collect_commands(node: tree_sitter::Node, source: &[u8], commands: &mut Vec<S
345345
// node use the field name "redirect".
346346
let parts: Vec<&str> = (0..node.child_count())
347347
.filter_map(|i| {
348-
let child = node.child(i)?;
348+
let child = node.child(i as u32)?;
349349
if !child.is_named() {
350350
return None;
351351
}

0 commit comments

Comments
 (0)