Skip to content

Commit 0dcf0a4

Browse files
committed
Update rust version
1 parent 41874cc commit 0dcf0a4

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.1.0"
44
authors = [""]
55
edition = "2024"
66
include = ["LICENSE-APACHE", "LICENSE-MIT", "**/*.rs", "Cargo.toml"]
7-
rust-version = "1.85"
7+
rust-version = "1.89"
88

99
[package.metadata.docs.rs]
1010
all-features = true

src/app.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -400,16 +400,16 @@ impl TemplateApp {
400400

401401
// handle dragging from panel
402402
// TODO probably should add panel_drag to the world so rendering is easier
403-
if let Some(panel_drag) = &self.panel_drag {
404-
if inside_rect(&canvas_rect, &panel_drag.ty) {
405-
log::debug!("drag inside rect");
406-
match panel_drag.ty {
407-
InstanceType::Gate(gate) => {
408-
self.draw_gate(ui, &gate);
409-
}
410-
InstanceType::Wire(wire) => {
411-
Self::draw_wire(ui, &wire);
412-
}
403+
if let Some(panel_drag) = &self.panel_drag
404+
&& inside_rect(&canvas_rect, &panel_drag.ty)
405+
{
406+
log::debug!("drag inside rect");
407+
match panel_drag.ty {
408+
InstanceType::Gate(gate) => {
409+
self.draw_gate(ui, &gate);
410+
}
411+
InstanceType::Wire(wire) => {
412+
Self::draw_wire(ui, &wire);
413413
}
414414
}
415415
}
@@ -590,11 +590,11 @@ impl TemplateApp {
590590
// TODO: implement instance rotate
591591
} else if let Some(_p_drag) = &mut self.panel_drag {
592592
// rotate instance when dragging from panel
593-
} else if let Some(mouse_pos) = pointer_pos {
594-
if let Some(i) = self.interacted_instance(mouse_pos) {
595-
let wire = self.get_wire_mut(i.id);
596-
wire.rotate_cw();
597-
}
593+
} else if let Some(mouse_pos) = pointer_pos
594+
&& let Some(i) = self.interacted_instance(mouse_pos)
595+
{
596+
let wire = self.get_wire_mut(i.id);
597+
wire.rotate_cw();
598598
}
599599
}
600600
for instance in &self.instances {

0 commit comments

Comments
 (0)