chore: a few more minor lints
This commit is contained in:
parent
3e72969ce4
commit
3e7721e554
4 changed files with 5 additions and 5 deletions
|
|
@ -873,7 +873,7 @@ impl Generator {
|
|||
&& chars.ranges().all(|r| {
|
||||
let start = *r.start() as u32;
|
||||
let end = *r.end() as u32;
|
||||
end <= start + 1 && end <= u16::MAX as u32
|
||||
end <= start + 1 && u16::try_from(end).is_ok()
|
||||
})
|
||||
{
|
||||
leading_simple_transition_count += 1;
|
||||
|
|
|
|||
|
|
@ -2203,7 +2203,7 @@ impl<'cursor> TreeCursor<'cursor> {
|
|||
pub fn goto_first_child_for_byte(&mut self, index: usize) -> Option<usize> {
|
||||
let result =
|
||||
unsafe { ffi::ts_tree_cursor_goto_first_child_for_byte(&mut self.0, index as u32) };
|
||||
(result >= 0).then_some(result as usize)
|
||||
result.try_into().ok()
|
||||
}
|
||||
|
||||
/// Move this cursor to the first child of its current node that contains or
|
||||
|
|
@ -2215,7 +2215,7 @@ impl<'cursor> TreeCursor<'cursor> {
|
|||
pub fn goto_first_child_for_point(&mut self, point: Point) -> Option<usize> {
|
||||
let result =
|
||||
unsafe { ffi::ts_tree_cursor_goto_first_child_for_point(&mut self.0, point.into()) };
|
||||
(result >= 0).then_some(result as usize)
|
||||
result.try_into().ok()
|
||||
}
|
||||
|
||||
/// Re-initialize this tree cursor to start at the original node that the
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ fn update_cmake(next_version: &Version) -> Result<()> {
|
|||
let end_quote = line.rfind('"').unwrap();
|
||||
format!(
|
||||
"{}{next_version}{}",
|
||||
&line[..start_quote + 1],
|
||||
&line[..=start_quote],
|
||||
&line[end_quote..]
|
||||
)
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ fn check_wasm_exports() -> Result<()> {
|
|||
let mut missing = exports
|
||||
.iter()
|
||||
.filter(|&symbol| !wasm_exports.contains(symbol))
|
||||
.map(|symbol| symbol.as_str())
|
||||
.map(String::as_str)
|
||||
.collect::<Vec<_>>();
|
||||
missing.sort_unstable();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue