Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zenMaya committed Aug 24, 2020
1 parent 0e4c7a4 commit da75647
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions crates/bevy_input/src/axis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,14 @@ where
}

pub fn set(&mut self, axis_id: T, value: f32) {
match self.axes.get_mut(&axis_id) {
Some(axis) => {
*axis = value;
}
None => (), // Panic?? Or Result?
if let Some(axis) = self.axes.get_mut(&axis_id) {
*axis = value;
}
}

pub fn add(&mut self, axis_id: T, value: f32) {
match self.axes.get_mut(&axis_id) {
Some(axis) => {
*axis += value;
}
None => (), // Panic?? Or Result?
if let Some(axis) = self.axes.get_mut(&axis_id) {
*axis += value;
}
}

Expand Down

0 comments on commit da75647

Please sign in to comment.