From 82539dc3be545ab1ca981e9c91109f4e409e4a09 Mon Sep 17 00:00:00 2001 From: Hamir Mahal Date: Sun, 30 Jun 2024 00:44:24 -0700 Subject: [PATCH] refactor: replace `get(0)` with cleaner `first()` --- src/wayland_record.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wayland_record.rs b/src/wayland_record.rs index 8e49768..0549c4d 100644 --- a/src/wayland_record.rs +++ b/src/wayland_record.rs @@ -224,13 +224,13 @@ impl WaylandRecorder { .clone() .downcast::>() .expect("cannot down cast streams to vec array") - .get(0) + .first() .expect("cannot get first object from streams array") .clone() .downcast::() .expect("cannot down cast first object to structure") .fields() - .get(0) + .first() .expect("cannot get first field from structure") .clone() .downcast::()