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
@@ -250,7 +250,10 @@ impl FereseShell {
|
||||
.as_ref()
|
||||
.is_some_and(|surface| !wanted || selected.as_ref() != Some(&surface.output))
|
||||
{
|
||||
let surface = self.notification_surface.take().unwrap();
|
||||
let surface = self
|
||||
.notification_surface
|
||||
.take()
|
||||
.expect("notification teardown selected an existing notification surface");
|
||||
tasks.push(destroy_layer_surface(surface.id));
|
||||
}
|
||||
if !wanted {
|
||||
@@ -630,7 +633,9 @@ impl FereseShell {
|
||||
&& let Some(effects) = &surface.effects
|
||||
{
|
||||
let _ = effects.set_presentation(
|
||||
&surface.regions.lock().unwrap(),
|
||||
&surface.regions.lock().expect(
|
||||
"surface rendering state must remain consistent across callbacks",
|
||||
),
|
||||
1.0,
|
||||
self.notifications
|
||||
.popup_groups_at(now)
|
||||
|
||||
Reference in new issue
Block a user