mirror of
https://github.com/xlmnxp/blue-recorder.git
synced 2024-11-23 17:13:11 +03:00
refactor: replace get(0)
with cleaner first()
This commit is contained in:
parent
37bf4aeb40
commit
82539dc3be
@ -224,13 +224,13 @@ impl WaylandRecorder {
|
|||||||
.clone()
|
.clone()
|
||||||
.downcast::<Vec<Value>>()
|
.downcast::<Vec<Value>>()
|
||||||
.expect("cannot down cast streams to vec array")
|
.expect("cannot down cast streams to vec array")
|
||||||
.get(0)
|
.first()
|
||||||
.expect("cannot get first object from streams array")
|
.expect("cannot get first object from streams array")
|
||||||
.clone()
|
.clone()
|
||||||
.downcast::<Structure>()
|
.downcast::<Structure>()
|
||||||
.expect("cannot down cast first object to structure")
|
.expect("cannot down cast first object to structure")
|
||||||
.fields()
|
.fields()
|
||||||
.get(0)
|
.first()
|
||||||
.expect("cannot get first field from structure")
|
.expect("cannot get first field from structure")
|
||||||
.clone()
|
.clone()
|
||||||
.downcast::<u32>()
|
.downcast::<u32>()
|
||||||
|
Loading…
Reference in New Issue
Block a user