diff --git a/Cargo.toml b/Cargo.toml index 5b7f8fb..2cbf1e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "prongs" -version = "0.0.3" +version = "0.0.4" authors = ["Ales Katona "] edition = "2018" readme = "README.md" diff --git a/src/backend_gilrs.rs b/src/backend_gilrs.rs index f2d32a5..d32765c 100644 --- a/src/backend_gilrs.rs +++ b/src/backend_gilrs.rs @@ -33,7 +33,7 @@ where TUserAction: Clone + Serialize, self.schema.clear_assignments(); } - pub fn process_event(&mut self, event: &Event) -> Option> { + pub fn process_event(&self, event: &Event) -> Option> { self.schema.process_event(event) } diff --git a/src/backend_piston.rs b/src/backend_piston.rs index e52a816..bc9fd12 100644 --- a/src/backend_piston.rs +++ b/src/backend_piston.rs @@ -41,7 +41,7 @@ where TUserAction: Clone + Serialize, /// Main event processing hook. Will result in ProcessingResult for user's action if /// a mapping is withing the schema for the given event. - pub fn process_event(&mut self, event: &Event) -> Option> { + pub fn process_event(&self, event: &Event) -> Option> { self.schema.process_event(event) } diff --git a/src/lib.rs b/src/lib.rs index 2f560ec..ad22d23 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -132,7 +132,7 @@ where TEventType: ToEventType, /// Main processing loop. Takes input event and returns an option with processing result /// If the mapping was found result will be set, otherwise None - fn process_event(&mut self, event: &TEventType) -> Option> { + fn process_event(&self, event: &TEventType) -> Option> { if let Some(event_type) = event.to_raw() { if let Some(action) = self.keymap.get(&event_type) { if self.controller_id.is_some() && self.controller_id != event.controller_id() {