diff --git a/draw-cache/CHANGELOG.md b/draw-cache/CHANGELOG.md index b3b75d8..9715002 100644 --- a/draw-cache/CHANGELOG.md +++ b/draw-cache/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased * Clarify `Rectangle` docs. +* Update _rustc-hash_ to `2`. # 0.1.5 * Micro-optimise avoid `.round()` during glyph drawing when converting pixel coverage to `u8`. diff --git a/draw-cache/Cargo.toml b/draw-cache/Cargo.toml index 1df9f10..7394185 100644 --- a/draw-cache/Cargo.toml +++ b/draw-cache/Cargo.toml @@ -12,7 +12,7 @@ readme = "README.md" [dependencies] ab_glyph = "0.2.2" linked-hash-map = "0.5.4" -rustc-hash = "1" +rustc-hash = "2" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] crossbeam-channel = "0.5" diff --git a/glyph-brush/CHANGELOG.md b/glyph-brush/CHANGELOG.md index df03711..060e4cd 100644 --- a/glyph-brush/CHANGELOG.md +++ b/glyph-brush/CHANGELOG.md @@ -1,5 +1,6 @@ # Unreleased * Add `GlyphCruncher::glyphs` doc example of using `section_index` & `byte_index`. +* Update _rustc-hash_ to `2`. # v0.7.8 * Update _ordered-float_ to `4`. diff --git a/glyph-brush/Cargo.toml b/glyph-brush/Cargo.toml index 3956738..86a46b1 100644 --- a/glyph-brush/Cargo.toml +++ b/glyph-brush/Cargo.toml @@ -13,7 +13,7 @@ readme = "README.md" glyph_brush_draw_cache = { version = "0.1.1", path = "../draw-cache" } glyph_brush_layout = { version = "0.2.3", path = "../layout" } ordered-float = "4" -rustc-hash = "1" +rustc-hash = "2" twox-hash = { version = "1.6.1", default-features = false } # enable twox-hash rand/std everywhere except wasm diff --git a/layout/src/builtin.rs b/layout/src/builtin.rs index e40faa7..e8c25cf 100644 --- a/layout/src/builtin.rs +++ b/layout/src/builtin.rs @@ -352,20 +352,26 @@ impl VerticalAlign { #[cfg(test)] mod bounds_test { use super::*; - use std::f32::INFINITY as inf; + + const fn inf() -> f32 { + f32::INFINITY + } #[test] fn v_align_y_bounds_inf() { - assert_eq!(VerticalAlign::Top.y_bounds(0.0, inf), (0.0, inf)); - assert_eq!(VerticalAlign::Center.y_bounds(0.0, inf), (-inf, inf)); - assert_eq!(VerticalAlign::Bottom.y_bounds(0.0, inf), (-inf, 0.0)); + assert_eq!(VerticalAlign::Top.y_bounds(0.0, inf()), (0.0, inf())); + assert_eq!(VerticalAlign::Center.y_bounds(0.0, inf()), (-inf(), inf())); + assert_eq!(VerticalAlign::Bottom.y_bounds(0.0, inf()), (-inf(), 0.0)); } #[test] fn h_align_x_bounds_inf() { - assert_eq!(HorizontalAlign::Left.x_bounds(0.0, inf), (0.0, inf)); - assert_eq!(HorizontalAlign::Center.x_bounds(0.0, inf), (-inf, inf)); - assert_eq!(HorizontalAlign::Right.x_bounds(0.0, inf), (-inf, 0.0)); + assert_eq!(HorizontalAlign::Left.x_bounds(0.0, inf()), (0.0, inf())); + assert_eq!( + HorizontalAlign::Center.x_bounds(0.0, inf()), + (-inf(), inf()) + ); + assert_eq!(HorizontalAlign::Right.x_bounds(0.0, inf()), (-inf(), 0.0)); } } @@ -815,7 +821,7 @@ mod layout_test { let glyphs = Layout::default_wrap().calculate_glyphs( &*FONT_MAP, &SectionGeometry { - bounds: (50.0, ::std::f32::INFINITY), + bounds: (50.0, f32::INFINITY), ..SectionGeometry::default() }, &[