Skip to content

Commit 92d5853

Browse files
behdadclaude
andauthored
[api] Gate the experimental shape() free function (#406)
The `harfrust::shape` free function is re-exported only under the `experimental_font_api` feature (it takes a `FontInstance`, which is public only under that feature), but its definition was not gated to match. In a default-feature build the re-export is compiled out while the function remains, leaving it unreachable and triggering a dead_code warning (visible during `cargo publish` verification). Gate the definition with the same `#[cfg(feature = "experimental_font_api")]`. No functional change; the experimental API is unaffected and there is no cascade -- its helpers stay reachable through other paths. Assisted-by: Claude <noreply@anthropic.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 60b28ea commit 92d5853

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

harfrust/src/hb/face.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,7 @@ impl Scale {
436436
///
437437
/// Will panic when debugging assertions are enabled if the buffer and plan have mismatched
438438
/// properties.
439+
#[cfg(feature = "experimental_font_api")]
439440
pub fn shape(
440441
font: &crate::font::FontInstance,
441442
mut buffer: UnicodeBuffer,

0 commit comments

Comments
 (0)