chore: Fix several style lints (#17488)

It's not comprehensive enough to start linting on `style` group, but
hey, it's a start.

Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz 2024-09-06 11:58:39 +02:00 committed by GitHub
parent 93249fc82b
commit e6c1c51b37
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
361 changed files with 3530 additions and 3587 deletions

View file

@ -600,7 +600,7 @@ async fn find_or_create_billing_customer(
// there's nothing more we need to do.
if let Some(billing_customer) = app
.db
.get_billing_customer_by_stripe_customer_id(&customer_id)
.get_billing_customer_by_stripe_customer_id(customer_id)
.await?
{
return Ok(Some(billing_customer));
@ -609,7 +609,7 @@ async fn find_or_create_billing_customer(
// If all we have is a customer ID, resolve it to a full customer record by
// hitting the Stripe API.
let customer = match customer_or_id {
Expandable::Id(id) => Customer::retrieve(&stripe_client, &id, &[]).await?,
Expandable::Id(id) => Customer::retrieve(stripe_client, &id, &[]).await?,
Expandable::Object(customer) => *customer,
};

View file

@ -397,7 +397,7 @@ pub async fn post_events(
match &wrapper.event {
Event::Editor(event) => to_upload.editor_events.push(EditorEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
country_code.clone(),
@ -410,7 +410,7 @@ pub async fn post_events(
.inline_completion_events
.push(InlineCompletionEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
country_code.clone(),
@ -419,7 +419,7 @@ pub async fn post_events(
}
Event::Call(event) => to_upload.call_events.push(CallEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
@ -429,7 +429,7 @@ pub async fn post_events(
.assistant_events
.push(AssistantEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
@ -437,42 +437,42 @@ pub async fn post_events(
}
Event::Cpu(event) => to_upload.cpu_events.push(CpuEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
)),
Event::Memory(event) => to_upload.memory_events.push(MemoryEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
)),
Event::App(event) => to_upload.app_events.push(AppEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
)),
Event::Setting(event) => to_upload.setting_events.push(SettingEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
)),
Event::Edit(event) => to_upload.edit_events.push(EditEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
)),
Event::Action(event) => to_upload.action_events.push(ActionEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
@ -486,7 +486,7 @@ pub async fn post_events(
.extension_events
.push(ExtensionEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
metadata,
first_event_at,
@ -495,7 +495,7 @@ pub async fn post_events(
}
Event::Repl(event) => to_upload.repl_events.push(ReplEventRow::from_event(
event.clone(),
&wrapper,
wrapper,
&request_body,
first_event_at,
checksum_matched,
@ -1332,7 +1332,7 @@ pub fn calculate_json_checksum(app: Arc<AppState>, json: &impl AsRef<[u8]>) -> O
let mut summer = Sha256::new();
summer.update(checksum_seed);
summer.update(&json);
summer.update(json);
summer.update(checksum_seed);
Some(summer.finalize().into_iter().collect())
}

View file

@ -319,14 +319,14 @@ async fn fetch_extensions_from_blob_store(
if let Some(extension) = fetch_extension_manifest(
blob_store_client,
blob_store_bucket,
&extension_id,
&published_version,
extension_id,
published_version,
)
.await
.log_err()
{
new_versions
.entry(&extension_id)
.entry(extension_id)
.or_default()
.push(extension);
}