1
Fork 0

use is_empty() instead of len() == x to determine if structs are empty.

This commit is contained in:
Matthias Krüger 2020-02-28 14:20:33 +01:00
parent e2223c94bf
commit 9523c89f18
54 changed files with 78 additions and 82 deletions

View file

@ -304,7 +304,7 @@ impl Backtrace {
// If no frames came out assume that this is an unsupported platform
// since `backtrace` doesn't provide a way of learning this right now,
// and this should be a good enough approximation.
let inner = if frames.len() == 0 {
let inner = if frames.is_empty() {
Inner::Unsupported
} else {
Inner::Captured(Mutex::new(Capture {