TestComponent: Use is_empty instead of .len == 0

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2022-09-24 17:38:21 +02:00
parent 0252aece38
commit 836bfcd7dd
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -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"
);
}