Enable clippy::single_char_pattern
(#8727)
This PR enables the [`clippy::single_char_pattern`](https://rust-lang.github.io/rust-clippy/master/index.html#/single_char_pattern) rule and fixes the outstanding violations. Release Notes: - N/A
This commit is contained in:
parent
12440d5e0d
commit
5935681c5c
22 changed files with 45 additions and 46 deletions
|
@ -377,7 +377,7 @@ impl LanguageServer {
|
|||
let headers = std::str::from_utf8(&buffer)?;
|
||||
|
||||
let message_len = headers
|
||||
.split("\n")
|
||||
.split('\n')
|
||||
.find(|line| line.starts_with(CONTENT_LEN_HEADER))
|
||||
.and_then(|line| line.strip_prefix(CONTENT_LEN_HEADER))
|
||||
.ok_or_else(|| anyhow!("invalid LSP message header {headers:?}"))?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue