parent
63e54e30a7
commit
f7c8500797
1 changed files with 2 additions and 4 deletions
|
@ -47,7 +47,7 @@ fn calculate_indentation(query: &IndentQuery, node: Option<Node>, newline: bool)
|
||||||
// NOTE: can't use contains() on query because of comparing Vec<String> and &str
|
// NOTE: can't use contains() on query because of comparing Vec<String> and &str
|
||||||
// https://doc.rust-lang.org/std/vec/struct.Vec.html#method.contains
|
// https://doc.rust-lang.org/std/vec/struct.Vec.html#method.contains
|
||||||
|
|
||||||
let mut increment: i32 = 0;
|
let mut increment: isize = 0;
|
||||||
|
|
||||||
let mut node = match node {
|
let mut node = match node {
|
||||||
Some(node) => node,
|
Some(node) => node,
|
||||||
|
@ -93,9 +93,7 @@ fn calculate_indentation(query: &IndentQuery, node: Option<Node>, newline: bool)
|
||||||
node = parent;
|
node = parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
assert!(increment >= 0);
|
increment.max(0) as usize
|
||||||
|
|
||||||
increment as usize
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[allow(dead_code)]
|
#[allow(dead_code)]
|
||||||
|
|
Loading…
Add table
Reference in a new issue