Skip to content

Commit

Permalink
fixup: make EventPayload::new a const function
Browse files Browse the repository at this point in the history
  • Loading branch information
ssp-rs committed Jan 22, 2024
1 parent 1a9acff commit 92a49a7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/types/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
}

Expand Down

0 comments on commit 92a49a7

Please sign in to comment.