about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-02-29 02:16:21 +0100
committerGitHub <noreply@github.com>2020-02-29 02:16:21 +0100
commitc8db7dcc1cd91366dda9bea92e38b5d215ede1f1 (patch)
tree30b13312973df647f11481151c9fc7bea077479a /src/libstd
parentba2df27525ab535aa600cd25fda4aa7f0f13a2aa (diff)
parent1622b6ef7372c40381914facf8794d851fcd9eb1 (diff)
downloadrust-c8db7dcc1cd91366dda9bea92e38b5d215ede1f1.tar.gz
rust-c8db7dcc1cd91366dda9bea92e38b5d215ede1f1.zip
Rollup merge of #69551 - matthiaskrgr:len_zero, r=Mark-Simulacrum
use is_empty() instead of len() == x  to determine if structs are empty.
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/backtrace.rs2
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 {