oh my god this was so painful to debug

Literally, I just didn't know what something was so I put unreachable??? Hello???
This commit is contained in:
Emilia Allison 2025-11-25 20:57:23 -05:00
parent 7e55ad033e
commit 45f81d2409
Signed by: emilia
GPG Key ID: FEC1CE6360EEC9A8
2 changed files with 14 additions and 13 deletions

View File

@ -419,7 +419,7 @@ fn add_plate_sub(
row: c_row, row: c_row,
col: c_column, col: c_column,
}, },
None, Some(plate_type),
) )
}) { }) {
painter.circle_stroke(center, radius * 0.80, *STROKE_CURRENT); painter.circle_stroke(center, radius * 0.80, *STROKE_CURRENT);

View File

@ -117,8 +117,7 @@ impl CurrentTransferStateInterior {
let volume: f32 = match transfer.volume { let volume: f32 = match transfer.volume {
plate_tool_lib::transfer_volume::TransferVolume::Single(x) => x, plate_tool_lib::transfer_volume::TransferVolume::Single(x) => x,
plate_tool_lib::transfer_volume::TransferVolume::WellMap(_) => { plate_tool_lib::transfer_volume::TransferVolume::WellMap(_) => {
log::warn!("COOL BUG: I genuinely don't know when this variant is used and honestly assume that it just never is constructed! Anyway, here's main state:\n{:?}", ms); f32::NAN
unreachable!("It better not!");
} }
_ => unreachable!(), _ => unreachable!(),
}; };
@ -213,16 +212,18 @@ pub fn transfer_menu(
); );
}); });
ui.horizontal(|ui| { if state.volume.is_finite() {
ui.add(egui::Label::new("Volume")); ui.horizontal(|ui| {
extra_widgets::drag_value_with_scroll( ui.add(egui::Label::new("Volume"));
ui, extra_widgets::drag_value_with_scroll(
&mut state.volume, ui,
0.0..=f32::INFINITY, &mut state.volume,
0.5, 0.0..=f32::INFINITY,
1.0, 0.5,
); 1.0,
}); );
});
}
ui.horizontal(|ui| { ui.horizontal(|ui| {
ui.add(egui::Label::new("Source Region")); ui.add(egui::Label::new("Source Region"));