diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2020-02-28 14:20:33 +0100 |
|---|---|---|
| committer | Matthias Krüger <matthias.krueger@famsik.de> | 2020-02-28 15:16:27 +0100 |
| commit | 9523c89f18ca62c992e580fc33fe1bf092696d8d (patch) | |
| tree | fe98aa841d6ff82631ffc933c6f632f16e96546f /src/libstd | |
| parent | e2223c94bf433fc38234d1303e88cbaf14755863 (diff) | |
| download | rust-9523c89f18ca62c992e580fc33fe1bf092696d8d.tar.gz rust-9523c89f18ca62c992e580fc33fe1bf092696d8d.zip | |
use is_empty() instead of len() == x to determine if structs are empty.
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/backtrace.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstd/backtrace.rs b/src/libstd/backtrace.rs index a1c9aa75d77..97db0ff3791 100644 --- a/src/libstd/backtrace.rs +++ b/src/libstd/backtrace.rs @@ -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 { |
