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() .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>()