chore: Another round of style lints fixes (#17519)

Closes #ISSUE

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-07 02:36:55 +02:00 committed by GitHub
parent cfd43572c1
commit 095a08d9c8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
33 changed files with 67 additions and 82 deletions

View file

@ -30,7 +30,7 @@ struct CheckIsContributorParams {
}
impl CheckIsContributorParams {
fn as_contributor_selector(self) -> Result<ContributorSelector> {
fn into_contributor_selector(self) -> Result<ContributorSelector> {
if let Some(github_user_id) = self.github_user_id {
return Ok(ContributorSelector::GitHubUserId { github_user_id });
}
@ -54,7 +54,7 @@ async fn check_is_contributor(
Extension(app): Extension<Arc<AppState>>,
Query(params): Query<CheckIsContributorParams>,
) -> Result<Json<CheckIsContributorResponse>> {
let params = params.as_contributor_selector()?;
let params = params.into_contributor_selector()?;
if RenovateBot::is_renovate_bot(&params) {
return Ok(Json(CheckIsContributorResponse {

View file

@ -1326,9 +1326,7 @@ impl ActionEventRow {
}
pub fn calculate_json_checksum(app: Arc<AppState>, json: &impl AsRef<[u8]>) -> Option<Vec<u8>> {
let Some(checksum_seed) = app.config.zed_client_checksum_seed.as_ref() else {
return None;
};
let checksum_seed = app.config.zed_client_checksum_seed.as_ref()?;
let mut summer = Sha256::new();
summer.update(checksum_seed);

View file

@ -52,7 +52,7 @@ async fn get_extensions(
let extension_id = filter.to_lowercase();
let mut exact_match = None;
extensions.retain(|extension| {
if extension.id.as_ref() == &extension_id {
if extension.id.as_ref() == extension_id {
exact_match = Some(extension.clone());
false
} else {