1
0
Fork 0
forked from wry/wry

all: add (Clone)Cell::is_some and is_none

This commit is contained in:
Julian Orth 2024-03-02 18:09:40 +01:00
parent 7a67784502
commit 54d93f84da
32 changed files with 98 additions and 62 deletions

View file

@ -408,7 +408,7 @@ impl MetalConnector {
let dd = self.display.borrow_mut();
self.enabled.get()
&& dd.connection == ConnectorStatus::Connected
&& self.primary_plane.get().is_some()
&& self.primary_plane.is_some()
}
pub fn schedule_present(&self) {
@ -1631,7 +1631,7 @@ impl MetalBackend {
let mut preserve = Preserve::default();
self.init_drm_device(dev, &mut preserve)?;
for connector in dev.connectors.lock().values() {
if connector.primary_plane.get().is_some() {
if connector.primary_plane.is_some() {
connector.schedule_present();
}
}
@ -2194,7 +2194,7 @@ impl MetalBackend {
}
let crtc = 'crtc: {
for crtc in dd.crtcs.values() {
if crtc.connector.get().is_none() {
if crtc.connector.is_none() {
break 'crtc crtc.clone();
}
}