From 430b3abc9fa3d0c5599f41743992aa3d358d6658 Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Tue, 19 Dec 2023 17:02:15 -0700 Subject: [PATCH] Fix no_std build --- src/shape_plan_cache.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/shape_plan_cache.rs b/src/shape_plan_cache.rs index 19ce69b..e393689 100644 --- a/src/shape_plan_cache.rs +++ b/src/shape_plan_cache.rs @@ -1,3 +1,6 @@ +#[cfg(not(feature = "std"))] +use hashbrown::hash_map::Entry; +#[cfg(feature = "std")] use std::collections::hash_map::Entry; use crate::{Font, HashMap}; @@ -45,7 +48,7 @@ impl ShapePlanCache { } } -impl std::fmt::Debug for ShapePlanCache { +impl core::fmt::Debug for ShapePlanCache { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { f.debug_tuple("ShapePlanCache").finish() }