We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2c6bf70 commit c2c1b15Copy full SHA for c2c1b15
1 file changed
src/dock.rs
@@ -450,10 +450,10 @@ impl TileLayoutState {
450
panel_str_id: &str,
451
) -> Option<&mut T> {
452
// First try the built panels map
453
- if let Some(&panel_id) = self.panel_id_map.get(panel_str_id) {
454
- if let Some(panel) = self.panels.get_mut(&panel_id) {
455
- return (panel.as_mut() as &mut dyn std::any::Any).downcast_mut::<T>();
456
- }
+ if let Some(&panel_id) = self.panel_id_map.get(panel_str_id)
+ && let Some(panel) = self.panels.get_mut(&panel_id)
+ {
+ return (panel.as_mut() as &mut dyn std::any::Any).downcast_mut::<T>();
457
}
458
// Fall back to pending panels (not yet moved into the map)
459
for pending in &mut self.pending {
0 commit comments