Skip to content

Commit

Permalink
more pattern match cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
JonasGruenwald committed Jun 23, 2024
1 parent 4c3006d commit 27462a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/chrobot.gleam
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 27462a2

Please sign in to comment.