Skip to content

Commit 25f09a4

Browse files
Clean up
1 parent a704839 commit 25f09a4

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

relay-server/src/endpoints/playstation.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ fn infer_attachment_type(_field_name: Option<&str>, file_name: &str) -> Attachme
4242
async fn extract_multipart(
4343
multipart: UnconstrainedMultipart,
4444
meta: RequestMeta,
45-
state: &ServiceState,
45+
config: &Config,
4646
) -> Result<Box<Envelope>, BadStoreRequest> {
47-
let mut items = multipart
48-
.items(infer_attachment_type, state.config())
49-
.await?;
47+
let mut items = multipart.items(infer_attachment_type, config).await?;
5048

5149
let prosperodump_item = items
5250
.iter_mut()
@@ -75,7 +73,7 @@ async fn handle(
7573
) -> axum::response::Result<impl IntoResponse> {
7674
// The crash dumps are transmitted as `...` in a multipart form-data/ request.
7775
let multipart = request.extract_with_state(&state).await?;
78-
let mut envelope = extract_multipart(multipart, meta, &state).await?;
76+
let mut envelope = extract_multipart(multipart, meta, state.config()).await?;
7977
envelope.require_feature(Feature::PlaystationIngestion);
8078

8179
let id = envelope.event_id();

relay-server/src/utils/multipart.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ impl ConstrainedMultipart {
354354
where
355355
F: FnMut(Option<&str>, &str) -> AttachmentType,
356356
{
357-
// We don't emit an outcome in this code branch since we return an error to the request
357+
// The emit outcome closure here does nothing since in this code branch we don't want to
358+
// emit outcomes as we already return an error to the request.
358359
multipart_items(self.0, infer_type, |_| (), config, false).await
359360
}
360361
}

0 commit comments

Comments
 (0)