refactor(wayland): less crashy

This commit is contained in:
Nova
2023-07-21 13:33:28 -04:00
parent 37413a3e74
commit fe28d6670e
7 changed files with 128 additions and 100 deletions

View File

@@ -54,8 +54,8 @@ impl EnvironmentItem {
}
}
impl ItemSpecialization for EnvironmentItem {
fn serialize_start_data(&self, id: &str) -> Vec<u8> {
serialize((id, self.path.as_str())).unwrap()
fn serialize_start_data(&self, id: &str) -> Option<Vec<u8>> {
serialize((id, self.path.as_str())).ok()
}
}