TestComponent: Use is_empty instead of .len == 0
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
parent
0252aece38
commit
836bfcd7dd
1 changed files with 2 additions and 3 deletions
|
@ -286,9 +286,8 @@ impl Drop for TestComponent {
|
|||
// while panicking" even when nobody asks for it (RUST_BACKTRACE unset). Let the error
|
||||
// appear if there isn't any other error.
|
||||
if !thread::panicking() {
|
||||
assert_eq!(
|
||||
self.expect_buffer.len(),
|
||||
0,
|
||||
assert!(
|
||||
self.expect_buffer.is_empty(),
|
||||
"Remaining expected elements in the buffer"
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue