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
|
@ -297,7 +297,7 @@ fn strip_invalid_spans_from_codeblock(
|
|||
} else if buffer.starts_with("<|")
|
||||
|| buffer.starts_with("<|S")
|
||||
|| buffer.starts_with("<|S|")
|
||||
|| buffer.ends_with("|")
|
||||
|| buffer.ends_with('|')
|
||||
|| buffer.ends_with("|E")
|
||||
|| buffer.ends_with("|E|")
|
||||
{
|
||||
|
@ -335,7 +335,7 @@ fn strip_invalid_spans_from_codeblock(
|
|||
.strip_suffix("|E|>")
|
||||
.or_else(|| text.strip_suffix("E|>"))
|
||||
.or_else(|| text.strip_prefix("|>"))
|
||||
.or_else(|| text.strip_prefix(">"))
|
||||
.or_else(|| text.strip_prefix('>'))
|
||||
.unwrap_or(&text)
|
||||
.to_string();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue