diff options
author | Marge Bot <marge-bot@gnome.org> | 2021-06-25 06:46:38 +0000 |
---|---|---|
committer | Marge Bot <marge-bot@gnome.org> | 2021-06-25 06:46:38 +0000 |
commit | c715cedb2472e49b90b7094d37182010052991b9 (patch) | |
tree | 9bd4e3b4db3c3e153ace710adfd9d4a5c2971c09 | |
parent | 2c87078c674ba15f90c578aaecc331b6aced92d1 (diff) | |
parent | 66c0a47a5e84cfad987a68244cf94f1c590cebdb (diff) | |
download | librsvg-c715cedb2472e49b90b7094d37182010052991b9.tar.gz |
Merge branch 'explicit-zero-type' into 'master'
(#757): Hack (?) to fix type inference on 32-bit builds
Closes #757
See merge request GNOME/librsvg!554
-rw-r--r-- | src/rect.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/rect.rs b/src/rect.rs index da6829e2..a8325f17 100644 --- a/src/rect.rs +++ b/src/rect.rs @@ -123,7 +123,9 @@ mod rect { impl Rect<i32> { #[inline] pub fn is_empty(&self) -> bool { - self.width() == Zero::zero() || self.height() == Zero::zero() + // Give an explicit type to the right hand side of the ==, since sometimes + // type inference fails to figure it out. I have no idea why. + self.width() == <i32 as Zero>::zero() || self.height() == <i32 as Zero>::zero() } #[inline] |