Skip to content

Commit dc64bb5

Browse files
committed
chore: adapt to latest clippy lints
1 parent 51acdf9 commit dc64bb5

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1340,7 +1340,7 @@ impl Highlight {
13401340
if let Some((lang, lang_config)) = loader.language_configuration_for_scope(scope)? {
13411341
language = Some(lang);
13421342
language_configuration = Some(lang_config);
1343-
};
1343+
}
13441344
if language.is_none() {
13451345
return Err(anyhow!("Unknown scope '{scope}'"));
13461346
}
@@ -1494,7 +1494,7 @@ impl Tags {
14941494
if let Some((lang, lang_config)) = loader.language_configuration_for_scope(scope)? {
14951495
language = Some(lang);
14961496
language_configuration = Some(lang_config);
1497-
};
1497+
}
14981498
if language.is_none() {
14991499
return Err(anyhow!("Unknown scope '{scope}'"));
15001500
}

cli/src/parse.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ pub fn parse_file_at_path(
279279
if opts.debug == ParseDebugType::Normal {
280280
if log_type == LogType::Lex {
281281
write!(&mut io::stderr(), " ").unwrap();
282-
};
282+
}
283283
writeln!(&mut io::stderr(), "{message}").unwrap();
284284
} else {
285285
let colors = &[
@@ -1069,7 +1069,7 @@ pub fn offset_for_position(input: &[u8], position: Point) -> Result<usize> {
10691069
if let Some(pos) = iter.next() {
10701070
if (pos - offset < position.column) || (input[offset] == b'\n' && position.column > 0) {
10711071
return Err(anyhow!("Failed to address a column: {}", position.column));
1072-
};
1072+
}
10731073
} else if input.len() - offset < position.column {
10741074
return Err(anyhow!("Failed to address a column over the end"));
10751075
}

cli/src/tests/parser_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2033,5 +2033,5 @@ const fn simple_range(start: usize, end: usize) -> Range {
20332033
}
20342034

20352035
fn chunked_input<'a>(text: &'a str, size: usize) -> impl FnMut(usize, Point) -> &'a [u8] {
2036-
move |offset, _| text[offset..text.len().min(offset + size)].as_bytes()
2036+
move |offset, _| &text.as_bytes()[offset..text.len().min(offset + size)]
20372037
}

lib/binding_rust/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2478,7 +2478,7 @@ impl Query {
24782478
_ => QueryErrorKind::Syntax,
24792479
};
24802480
}
2481-
};
2481+
}
24822482

24832483
return Err(QueryError {
24842484
row,

0 commit comments

Comments
 (0)