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:
@@ -2586,8 +2586,8 @@ mod tests {
|
||||
|
||||
let mut index = 0;
|
||||
let items = labels.map(|mut label| {
|
||||
if label.ends_with("*") {
|
||||
label = label.trim_end_matches("*");
|
||||
if label.ends_with('*') {
|
||||
label = label.trim_end_matches('*');
|
||||
active_item_index = index;
|
||||
}
|
||||
|
||||
|
||||
@@ -1260,7 +1260,7 @@ impl Workspace {
|
||||
fn send_keystrokes(&mut self, action: &SendKeystrokes, cx: &mut ViewContext<Self>) {
|
||||
let mut keystrokes: Vec<Keystroke> = action
|
||||
.0
|
||||
.split(" ")
|
||||
.split(' ')
|
||||
.flat_map(|k| Keystroke::parse(k).log_err())
|
||||
.collect();
|
||||
keystrokes.reverse();
|
||||
|
||||
Reference in New Issue
Block a user