Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Lucas Fernandes Nogueira <[email protected]>
  • Loading branch information
amrbashir and lucasfernog authored Oct 21, 2024
1 parent f660e20 commit 896482f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/webkitgtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -866,9 +866,13 @@ impl InnerWebView {
})
});

gtk::main_iteration();
loop {
gtk::main_iteration();

rx.recv()?.map_err(Into::into)
if let Ok(response) = rx.try_recv() {
return response.map_err(Into::into);
}
}
}

pub fn cookies(&self) -> Result<Vec<cookie::Cookie<'static>>> {
Expand All @@ -889,9 +893,13 @@ impl InnerWebView {
})
});

gtk::main_iteration();
loop {
gtk::main_iteration();

rx.recv()?.map_err(Into::into)
if let Ok(response) = rx.try_recv() {
return response.map_err(Into::into);
}
}
}

pub fn reparent<W>(&self, container: &W) -> Result<()>
Expand Down

0 comments on commit 896482f

Please sign in to comment.