diff options
Diffstat (limited to 'components/gfx')
-rw-r--r-- | components/gfx/platform/freetype/font.rs | 2 | ||||
-rw-r--r-- | components/gfx/platform/freetype/font_list.rs | 2 | ||||
-rw-r--r-- | components/gfx/platform/macos/font.rs | 2 | ||||
-rw-r--r-- | components/gfx/text/shaping/harfbuzz.rs | 2 |
4 files changed, 4 insertions, 4 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); } diff --git a/components/gfx/text/shaping/harfbuzz.rs b/components/gfx/text/shaping/harfbuzz.rs index 36e35150ad1..c1b25e42d9b 100644 --- a/components/gfx/text/shaping/harfbuzz.rs +++ b/components/gfx/text/shaping/harfbuzz.rs @@ -64,7 +64,7 @@ impl ShapedGlyphData { let mut pos_count = 0; let pos_infos = hb_buffer_get_glyph_positions(buffer, &mut pos_count); assert!(!pos_infos.is_null()); - assert!(glyph_count == pos_count); + assert_eq!(glyph_count, pos_count); ShapedGlyphData { count: glyph_count as usize, |