aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/gfx/display_list/mod.rs2
-rw-r--r--components/layout/flow.rs2
-rw-r--r--tests/unit/net/hsts.rs3
3 files changed, 3 insertions, 4 deletions
diff --git a/components/gfx/display_list/mod.rs b/components/gfx/display_list/mod.rs
index b5cbc48cfba..4b6286aa998 100644
--- a/components/gfx/display_list/mod.rs
+++ b/components/gfx/display_list/mod.rs
@@ -213,7 +213,7 @@ impl DisplayList {
};
doit(&(self.all_display_items()));
- if self.children.len() != 0 {
+ if !self.children.is_empty() {
println!("{} Children stacking contexts list length: {}",
indentation,
self.children.len());
diff --git a/components/layout/flow.rs b/components/layout/flow.rs
index 550fed85fad..445a3e5a49c 100644
--- a/components/layout/flow.rs
+++ b/components/layout/flow.rs
@@ -244,7 +244,7 @@ pub trait Flow: fmt::Debug + Sync {
match self.class() {
FlowClass::Block |
FlowClass::TableCaption |
- FlowClass::TableCell if base(self).children.len() != 0 => {
+ FlowClass::TableCell if !base(self).children.is_empty() => {
// FIXME(#2795): Get the real container size.
let container_size = Size2D::zero();
for kid in mut_base(self).children.iter_mut() {
diff --git a/tests/unit/net/hsts.rs b/tests/unit/net/hsts.rs
index 7ac11d4dbc3..c5c91c687e9 100644
--- a/tests/unit/net/hsts.rs
+++ b/tests/unit/net/hsts.rs
@@ -275,7 +275,7 @@ fn test_hsts_list_with_expired_entry_is_not_is_host_secure() {
#[test]
fn test_preload_hsts_domains_well_formed() {
let hsts_list = preload_hsts_domains().unwrap();
- assert!(hsts_list.entries.len() != 0);
+ assert!(!hsts_list.entries.is_empty());
}
#[test]
@@ -301,4 +301,3 @@ fn test_secure_url_forces_an_http_host_in_list_to_https() {
assert_eq!(&secure.scheme, "https");
}
-