fix(wayland): remove unwraps

This commit is contained in:
Nova
2023-09-04 12:15:48 -04:00
parent 4c56c31bfc
commit 1d54b75a53
8 changed files with 71 additions and 108 deletions

View File

@@ -25,11 +25,9 @@ impl CompositorHandler for WaylandState {
.data_map
.insert_if_missing_threadsafe(|| AtomicU32::new(0));
if !count_new {
count = data
.data_map
.get::<AtomicU32>()
.unwrap()
.fetch_add(1, Ordering::Relaxed);
if let Some(stored_count) = data.data_map.get::<AtomicU32>() {
count = stored_count.fetch_add(1, Ordering::Relaxed);
}
}
data.data_map.get::<Arc<CoreSurface>>().cloned()