From 27462a25217ee6b7e77e4c3d0ef9d7d6ed63c3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Gru=CC=88nwald?= Date: Sun, 23 Jun 2024 16:28:33 +0200 Subject: [PATCH] more pattern match cleanup --- src/chrobot.gleam | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/chrobot.gleam b/src/chrobot.gleam index e257e71..14d2a8f 100644 --- a/src/chrobot.gleam +++ b/src/chrobot.gleam @@ -361,7 +361,7 @@ pub fn as_value( decoder, ) { case result { - Ok(runtime.RemoteObject(_, _, _, Some(value), _, _, _)) -> { + Ok(runtime.RemoteObject(value: Some(value), ..)) -> { decoder(value) |> result.replace_error(chrome.ProtocolError) } @@ -661,7 +661,7 @@ pub fn select_all(on page: Page, matching selector: String) { let selector_code = "window.document.querySelectorAll(\"" <> selector <> "\")" let result = eval(page, selector_code) case result { - Ok(runtime.RemoteObject(_, _, _, _, _, _, Some(remote_object_id))) -> { + Ok(runtime.RemoteObject(object_id: Some(remote_object_id), ..)) -> { use result_properties <- result.try(runtime.get_properties( page_caller(page), remote_object_id,