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:
Marshall Bowers 2024-03-02 17:04:59 -05:00 committed by GitHub
parent 12440d5e0d
commit 5935681c5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 45 additions and 46 deletions

View file

@ -95,10 +95,10 @@ impl OpenListener {
}
fn handle_zed_url_scheme(&self, request_path: &str) -> Option<OpenRequest> {
let mut parts = request_path.split("/");
let mut parts = request_path.split('/');
if parts.next() == Some("channel") {
if let Some(slug) = parts.next() {
if let Some(id_str) = slug.split("-").last() {
if let Some(id_str) = slug.split('-').last() {
if let Ok(channel_id) = id_str.parse::<u64>() {
let Some(next) = parts.next() else {
return Some(OpenRequest::JoinChannel { channel_id });