Skip to content

Commit

Permalink
run clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed Dec 18, 2024
1 parent c1a75a3 commit 7da6204
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
16 changes: 8 additions & 8 deletions simulator/src/renderer/egui_renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,17 +389,17 @@ impl EguiRenderer {
.default_open(true)
.show(ctx, |ui| {
ui.horizontal(|ui| {
ui.selectable_value(&mut state.tab, Tab::SLICE, "Slice");
ui.selectable_value(&mut state.tab, Tab::CAMERA, "Camera");
ui.selectable_value(&mut state.tab, Tab::CONFIG, "Config");
ui.selectable_value(&mut state.tab, Tab::INFO, "Info");
ui.selectable_value(&mut state.tab, Tab::Slice, "Slice");
ui.selectable_value(&mut state.tab, Tab::Camera, "Camera");
ui.selectable_value(&mut state.tab, Tab::Config, "Config");
ui.selectable_value(&mut state.tab, Tab::Info, "Info");
});
ui.separator();
match state.tab {
Tab::SLICE => Self::slice_tab(ui, state, update_flag),
Tab::CAMERA => Self::camera_tab(ui, state, update_flag),
Tab::CONFIG => Self::config_tab(ui, state, emulator, update_flag),
Tab::INFO => Self::info_tab(ui, state, emulator, update_flag),
Tab::Slice => Self::slice_tab(ui, state, update_flag),
Tab::Camera => Self::camera_tab(ui, state, update_flag),
Tab::Config => Self::config_tab(ui, state, emulator, update_flag),
Tab::Info => Self::info_tab(ui, state, emulator, update_flag),
}

ui.separator();
Expand Down
2 changes: 1 addition & 1 deletion simulator/src/renderer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ impl Renderer {
let view_proj = Self::proj_view(camera, state, window);
self.transducer_renderer.resize(view_proj, queue);
self.slice_renderer.resize(view_proj, queue);
self.depth_texture = DepthTexture::new(device, &surface_config);
self.depth_texture = DepthTexture::new(device, surface_config);
}
}

Expand Down
7 changes: 3 additions & 4 deletions simulator/src/simulator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ impl Simulator {
let system_time = self.state.system_time();
self.emulator.update(system_time);

match event {
Some(UserEvent::Server(signal)) => match signal {
if let Some(UserEvent::Server(signal)) = event {
match signal {
crate::event::Signal::ConfigGeometry(geometry) => {
self.emulator.initialize(geometry);
self.renderer.as_mut().unwrap().initialize(&self.emulator);
Expand Down Expand Up @@ -170,8 +170,7 @@ impl Simulator {
self.state.port
);
}
},
_ => {}
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions simulator/src/state/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,10 @@ impl SliceState {
#[derive(Debug, PartialEq, Default, Clone, Serialize, Deserialize)]
pub enum Tab {
#[default]
SLICE,
CAMERA,
CONFIG,
INFO,
Slice,
Camera,
Config,
Info,
}

#[derive(Serialize, Deserialize)]
Expand Down

0 comments on commit 7da6204

Please sign in to comment.