Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lbirkert committed Aug 12, 2023
1 parent e484764 commit f439bf0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/editor/camera.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ impl Camera {
Ray::new(pos.xzy(), normal.xzy())
}

pub fn handle(&mut self, ui: &mut egui::Ui, rect: egui::Rect, response: &egui::Response) {
pub fn handle(&mut self, ui: &egui::Ui, rect: egui::Rect, response: &egui::Response) {
self.resize(rect.size().x, rect.size().y);

const SAFE_FRAC_PI_2: f32 = std::f32::consts::FRAC_PI_2 - 0.0001;
Expand Down
2 changes: 1 addition & 1 deletion src/editor/log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl Log {
}
}

pub fn cursor_mut<'a>(&'a mut self) -> &'a mut Message {
pub fn cursor_mut(&mut self) -> &mut Message {
&mut self.messages[self.cursor]
}

Expand Down
4 changes: 1 addition & 3 deletions src/editor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,10 @@ impl Editor {
self.log.redo();
self.state.apply(self.log.cursor_mut());
}
} else {
if self.log.can_undo() {
} else if self.log.can_undo() {
self.state.apply(self.log.cursor_mut());
self.log.undo();
}
}
}
}

Expand Down

0 comments on commit f439bf0

Please sign in to comment.