Skip to content

Commit 1810527

Browse files
committed
Simplify assert on map key
The assert checking if the key is in the map can be written more simply. Use the `contains_key` function to make the code clearer and remove the lint error.
1 parent acd9332 commit 1810527

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

integration_test/tests/wallet.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ fn wallet__get_addresses_by_label__modelled() {
170170

171171
// sanity checks.
172172
assert!(!map.0.is_empty());
173-
assert!(map.0.get(&addr).is_some());
173+
assert!(map.0.contains_key(&addr));
174174
}
175175

176176
#[test]

0 commit comments

Comments
 (0)