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:
parent
755442641e
commit
0fa672f8da
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,7 @@ impl TryFrom<HashMap<String, OwnedValue>> for Gpu {
|
||||||
.chunks_exact(2)
|
.chunks_exact(2)
|
||||||
.map(|chunk| (chunk[0].clone(), chunk[1].clone()))
|
.map(|chunk| (chunk[0].clone(), chunk[1].clone()))
|
||||||
.collect();
|
.collect();
|
||||||
let default = value
|
let default: bool = value
|
||||||
.get("Default")
|
.get("Default")
|
||||||
.ok_or(zvariant::Error::IncorrectType)?
|
.ok_or(zvariant::Error::IncorrectType)?
|
||||||
.try_into()?;
|
.try_into()?;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue