From 92a49a7f07bfadb43e4bcf76bd88375c1f5a8b94 Mon Sep 17 00:00:00 2001 From: SSP Rust Developers <135766782+ssp-rs@users.noreply.github.com> Date: Mon, 22 Jan 2024 18:40:51 +0000 Subject: [PATCH] fixup: make `EventPayload::new` a `const` function --- src/types/events.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/types/events.rs b/src/types/events.rs index ed68412..b503e30 100644 --- a/src/types/events.rs +++ b/src/types/events.rs @@ -260,7 +260,7 @@ pub struct Event { impl Event { /// Creates a new [Event] from the provided `method` and `data`. - pub fn new(method: Method, payload: EventPayload) -> Self { + pub const fn new(method: Method, payload: EventPayload) -> Self { Self { method, payload } }