Skip to content

Commit f030b1c

Browse files
committed
Revert "refactor: Avoid Box"
This reverts commit bea8241. It actually caused lifetime problems in commons-operator
1 parent 713716a commit f030b1c

File tree

1 file changed

+4
-4
lines changed
  • crates/stackable-webhook/src

1 file changed

+4
-4
lines changed

crates/stackable-webhook/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ pub enum WebhookServerError {
7373
/// let webhook_server = WebhookServer::new(webhook_options, webhooks).await.unwrap();
7474
/// # }
7575
/// ```
76-
pub struct WebhookServer<'a> {
76+
pub struct WebhookServer {
7777
options: WebhookServerOptions,
78-
webhooks: Vec<&'a mut dyn Webhook>,
78+
webhooks: Vec<Box<dyn Webhook>>,
7979
tls_server: TlsServer,
8080
cert_rx: mpsc::Receiver<Certificate>,
8181
}
@@ -92,7 +92,7 @@ pub struct WebhookServerOptions {
9292
pub webhook_service_name: String,
9393
}
9494

95-
impl<'a> WebhookServer<'a> {
95+
impl WebhookServer {
9696
/// The default HTTPS port
9797
pub const DEFAULT_HTTPS_PORT: u16 = 8443;
9898
/// The default IP address [`Ipv4Addr::UNSPECIFIED`] (`0.0.0.0`) the webhook server binds to,
@@ -111,7 +111,7 @@ impl<'a> WebhookServer<'a> {
111111
/// Please read their documentation for details.
112112
pub async fn new(
113113
options: WebhookServerOptions,
114-
webhooks: Vec<&'a mut dyn Webhook>,
114+
webhooks: Vec<Box<dyn Webhook>>,
115115
) -> Result<Self> {
116116
tracing::trace!("create new webhook server");
117117

0 commit comments

Comments
 (0)