Skip to content

Commit

Permalink
Fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
CrendKing committed Aug 27, 2023
1 parent 5868531 commit 9497d0a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/browser/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ impl Process {
attempts += 1;
}

let mut child = process.0.borrow_mut();
let child = process.0.borrow_mut();
child.stderr = None;

Ok(Self {
Expand Down
11 changes: 8 additions & 3 deletions src/browser/tab/element/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ impl<'a> Element<'a> {
Some(serde_json::from_value(attribute_value)?)
} else {
None
}
},
)
}

Expand Down Expand Up @@ -527,10 +527,15 @@ impl<'a> Element<'a> {
object_id: None,
})
.and_then(|quad| {
quad.quads.first()
quad.quads
.first()
.map(|raw_quad| ElementQuad::from_raw_points(raw_quad))
.map(|input_quad| (input_quad.bottom_right + input_quad.top_left) / 2.0)
.ok_or_else(|| anyhow::anyhow!("tried to get the midpoint of an element which is not visible"))
.ok_or_else(|| {
anyhow::anyhow!(
"tried to get the midpoint of an element which is not visible"
)
})
})
{
return Ok(e);
Expand Down

0 comments on commit 9497d0a

Please sign in to comment.