From 6a89c77dd12d80850c3f8f7c3fd695e28711b32c Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Tue, 24 Sep 2024 22:24:15 +0700 Subject: [PATCH] Only build `BitmapData` and `Metrics` with "scale" feature. These are not public, so this shouldn't be a breaking change. When building without default features (and therefore without "scale"), these structs are unused and generate warnings. --- src/strike.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/strike.rs b/src/strike.rs index cb681c8..59e3db7 100644 --- a/src/strike.rs +++ b/src/strike.rs @@ -774,6 +774,7 @@ fn sbix_range(table: &[u8], strike_base: usize, glyph_id: u16, recurse: i32) -> } } +#[cfg(feature = "scale")] #[derive(Copy, Clone)] struct BitmapData<'a> { pub data: &'a [u8], @@ -806,6 +807,7 @@ impl<'a> BitmapData<'a> { } } +#[cfg(feature = "scale")] #[derive(Copy, Clone, Default)] struct Metrics { pub x: i8,