refactor: replace get(0) with cleaner first()

This commit is contained in:
Hamir Mahal 2024-06-30 00:44:24 -07:00
parent 37bf4aeb40
commit 82539dc3be
No known key found for this signature in database

View File

@ -224,13 +224,13 @@ impl WaylandRecorder {
.clone()
.downcast::<Vec<Value>>()
.expect("cannot down cast streams to vec array")
.get(0)
.first()
.expect("cannot get first object from streams array")
.clone()
.downcast::<Structure>()
.expect("cannot down cast first object to structure")
.fields()
.get(0)
.first()
.expect("cannot get first field from structure")
.clone()
.downcast::<u32>()