1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 05:10:03 -04:00

format let-else statements

This commit is contained in:
Emil Ernerfeldt
2023-11-03 13:15:21 +01:00
parent 9fd65ad21e
commit 1f0fc7a005
3 changed files with 53 additions and 15 deletions

View File

@@ -438,7 +438,9 @@ fn generic_ui(ui: &mut egui::Ui, container_id: impl Into<Id>) {
/// Move element ID to Viewport and col
fn mov(&mut self, to: Id, col: usize) {
let Some(id) = self.is_dragged.take() else {return};
let Some(id) = self.is_dragged.take() else {
return;
};
assert!(col <= COLS, "The col should be less then: {COLS}");
// Should be a better way to do this!