Explain runtime invariants and avoid redundant unwraps
This commit is contained in:
1 parent
34f2f07301
commit
1b51ba83b4
116 files changed
+1643
-515
No files matched your search
@@ -156,7 +156,10 @@ impl Ferese {
|
||||
self.windows.update(window, |w| w.maximized = false);
|
||||
}
|
||||
if self.workspaces.placement(window) == Some(WindowPlacement::Tiled) {
|
||||
let workspace_id = self.workspaces.workspace_for_window(window).unwrap();
|
||||
let workspace_id = self
|
||||
.workspaces
|
||||
.workspace_for_window(window)
|
||||
.expect("a tiled window belongs to a workspace");
|
||||
if let Some(workspace) = self.workspaces.workspace_mut(workspace_id)
|
||||
&& let WorkspaceLayout::Scrolling(layout) = &mut workspace.layout
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user