aboutsummaryrefslogtreecommitdiffstats
path: root/components/gfx/platform
diff options
context:
space:
mode:
Diffstat (limited to 'components/gfx/platform')
-rw-r--r--components/gfx/platform/freetype/font.rs2
-rw-r--r--components/gfx/platform/freetype/font_list.rs2
-rw-r--r--components/gfx/platform/macos/font.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/components/gfx/platform/freetype/font.rs b/components/gfx/platform/freetype/font.rs
index 112fc285b59..a7dd652b9f5 100644
--- a/components/gfx/platform/freetype/font.rs
+++ b/components/gfx/platform/freetype/font.rs
@@ -322,7 +322,7 @@ impl<'a> FontHandle {
let x_scale = (metrics.x_ppem as f64) / em_size as f64;
// If this isn't true then we're scaling one of the axes wrong
- assert!(metrics.x_ppem == metrics.y_ppem);
+ assert_eq!(metrics.x_ppem, metrics.y_ppem);
Au::from_f64_px(value * x_scale)
}
diff --git a/components/gfx/platform/freetype/font_list.rs b/components/gfx/platform/freetype/font_list.rs
index c4f0cfe4fec..9b85db624d8 100644
--- a/components/gfx/platform/freetype/font_list.rs
+++ b/components/gfx/platform/freetype/font_list.rs
@@ -63,7 +63,7 @@ pub fn for_each_variation<F>(family_name: &str, mut callback: F)
let family_name_c = CString::new(family_name).unwrap();
let family_name = family_name_c.as_ptr();
let ok = FcPatternAddString(pattern, FC_FAMILY.as_ptr() as *mut c_char, family_name as *mut FcChar8);
- assert!(ok != 0);
+ assert_ne!(ok, 0);
let object_set = FcObjectSetCreate();
assert!(!object_set.is_null());
diff --git a/components/gfx/platform/macos/font.rs b/components/gfx/platform/macos/font.rs
index beb8f9f4f2f..b14d30e6cca 100644
--- a/components/gfx/platform/macos/font.rs
+++ b/components/gfx/platform/macos/font.rs
@@ -247,7 +247,7 @@ impl FontHandleMethods for FontHandle {
return None;
}
- assert!(glyphs[0] != 0); // FIXME: error handling
+ assert_ne!(glyphs[0], 0); // FIXME: error handling
return Some(glyphs[0] as GlyphId);
}