fix(switcher): explicitly type default so it can be used as a fallback

Without typing unwrap_or doesn't know cannot use it as a fallback.
This commit is contained in:
Jan200101 2026-02-13 18:37:34 +01:00 committed by Michael Murphy
parent 755442641e
commit 0fa672f8da

View file

@ -99,7 +99,7 @@ impl TryFrom<HashMap<String, OwnedValue>> for Gpu {
.chunks_exact(2)
.map(|chunk| (chunk[0].clone(), chunk[1].clone()))
.collect();
let default = value
let default: bool = value
.get("Default")
.ok_or(zvariant::Error::IncorrectType)?
.try_into()?;