Skip to content

Commit 0d05c9f

Browse files
authored
Minor lint fix for Rust 1.81 (#1965)
I upgraded locally and clippy was mad about this line, so I applied the fix.
1 parent c6a5a00 commit 0d05c9f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

language_service/src/completion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ fn get_indent(compilation: &Compilation, package_offset: u32) -> String {
247247
.try_into()
248248
.expect("offset can't be converted to uszie");
249249
let before_offset = &source.contents[..source_offset];
250-
let mut indent = match before_offset.rfind(|c| c == '{' || c == '\n') {
250+
let mut indent = match before_offset.rfind(['{', '\n']) {
251251
Some(begin) => {
252252
let indent = &before_offset[begin..];
253253
indent.strip_prefix('{').unwrap_or(indent)

0 commit comments

Comments
 (0)