Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Oct 10, 2024
1 parent 33487e8 commit 48cadde
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/querying.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ fn main() {
// get_by_name won't panic here since we only find the button in the group
group.get_by_name("Duplicate");

let btn_in_parent = harness.get_all_by_name("Duplicate").next_back().unwrap();
assert_eq!(btn_in_parent.parent_id().unwrap(), group.id());
let btn_in_parent = harness.get_all_by_name("Duplicate").next_back().expect("No buttons found");
assert_eq!(btn_in_parent.parent_id().expect("No parent id"), group.id(), "Button is not in the group");

// query_by and get_by functions will panic if more than one node is found
// harness.get_by_role(Role::Button); // This will panic!
Expand Down

0 comments on commit 48cadde

Please sign in to comment.