Skip to content

Commit 60fb239

Browse files
committed
chore(sentry): remove unnecessary boxed webhook handler
1 parent 6cb4d23 commit 60fb239

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

  • rsworkspace/crates/trogon-source-sentry/src

rsworkspace/crates/trogon-source-sentry/src/server.rs

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use std::fmt;
2-
use std::future::Future;
3-
use std::pin::Pin;
42
use std::time::Duration;
53

64
use crate::config::SentryConfig;
@@ -76,14 +74,6 @@ pub fn router<P: JetStreamPublisher, S: ObjectStorePut>(
7674
.with_state(state)
7775
}
7876

79-
fn handle_webhook<P: JetStreamPublisher, S: ObjectStorePut>(
80-
State(state): State<AppState<P, S>>,
81-
headers: HeaderMap,
82-
body: Bytes,
83-
) -> Pin<Box<dyn Future<Output = StatusCode> + Send>> {
84-
Box::pin(handle_webhook_inner(state, headers, body))
85-
}
86-
8777
#[instrument(
8878
name = "sentry.webhook",
8979
skip_all,
@@ -94,8 +84,8 @@ fn handle_webhook<P: JetStreamPublisher, S: ObjectStorePut>(
9484
subject = tracing::field::Empty,
9585
)
9686
)]
97-
async fn handle_webhook_inner<P: JetStreamPublisher, S: ObjectStorePut>(
98-
state: AppState<P, S>,
87+
async fn handle_webhook<P: JetStreamPublisher, S: ObjectStorePut>(
88+
State(state): State<AppState<P, S>>,
9989
headers: HeaderMap,
10090
body: Bytes,
10191
) -> StatusCode {

0 commit comments

Comments
 (0)