Bug 1557721 - Simplify boolean expression. r=kvark
authorBruce Mitchener <bruce.mitchener@gmail.com>
Fri, 07 Jun 2019 16:18:25 +0000
changeset 477882 64ea2a3f0d4dd88bd83a03b811ecf4197a2723c8
parent 477881 5d31dd07595a0485d74f4653dbaf2aed5e38ac10
child 477883 6569dc72b7f9d3c8094b469141cf9a7856f38149
push id36125
push userapavel@mozilla.com
push dateFri, 07 Jun 2019 22:00:07 +0000
treeherdermozilla-central@d820bbb356aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskvark
bugs1557721
milestone69.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1557721 - Simplify boolean expression. r=kvark [wrupdater] From https://github.com/servo/webrender/pull/3667 Depends on D34164 Differential Revision: https://phabricator.services.mozilla.com/D34165
gfx/wr/webrender/src/storage.rs
--- a/gfx/wr/webrender/src/storage.rs
+++ b/gfx/wr/webrender/src/storage.rs
@@ -56,17 +56,17 @@ impl<T> Range<T> {
         Range {
             start: Index::new(0),
             end: Index::new(0),
         }
     }
 
     /// Check for an empty `Range`
     pub fn is_empty(&self) -> bool {
-        !(self.start.0 < self.end.0)
+        self.start.0 >= self.end.0
     }
 }
 
 #[cfg_attr(feature = "capture", derive(Serialize))]
 pub struct Storage<T> {
     data: Vec<T>,
 }