Skip to content

Commit eedc811

Browse files
committed
clippify
1 parent a175104 commit eedc811

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tools/twix/src/panels/automatic_camera_calibration_export.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ impl Widget for &mut AutomaticCameraCalibrationExportPanel {
4747
.get_last_value()
4848
.ok()
4949
.flatten()
50-
.map(|value| serde_json::from_value::<Corrections>(value).ok())
51-
.flatten()
50+
.and_then(|value| serde_json::from_value::<Corrections>(value).ok())
5251
{
5352
let top_angles = value.correction_in_camera_top.clone().euler_angles();
5453
let bottom_angles = value.correction_in_camera_bottom.euler_angles();
@@ -102,9 +101,9 @@ fn draw_group(ui: &mut Ui, label: &str, rotations: (f32, f32, f32), nao: &Nao, p
102101
}
103102

104103
fn draw_angles_from_buffer(ui: &mut Ui, current_values: &BufferHandle<Vector3<f32>>) {
105-
current_values.get_last_value().ok().flatten().map(|value| {
104+
if let Some(value) = current_values.get_last_value().ok().flatten() {
106105
draw_angles(ui, (value.x, value.y, value.z), "Current");
107-
});
106+
}
108107
}
109108
fn draw_angles(ui: &mut Ui, rotations: (f32, f32, f32), sublabel: &str) {
110109
ui.label(format!(

0 commit comments

Comments
 (0)