From 92f367ced3eb3f29f8c3609a579a64a5eda8ee79 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 7 May 2025 11:09:02 -0600 Subject: [PATCH] [rust] Apply review feedback --- src/rust/Cargo.lock | 2 +- src/rust/Cargo.toml | 2 +- src/rust/shape.rs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/rust/Cargo.lock b/src/rust/Cargo.lock index 62632c730..1b8260458 100644 --- a/src/rust/Cargo.lock +++ b/src/rust/Cargo.lock @@ -59,7 +59,7 @@ dependencies = [ [[package]] name = "harfruzz" version = "0.0.1" -source = "git+https://github.com/harfbuzz/harfruzz#006472176ab87e3a84e799e74e0ac19fbe943dd7" +source = "git+https://github.com/harfbuzz/harfruzz?rev=006472176ab87e3a84e799e74e0ac19fbe943dd7#006472176ab87e3a84e799e74e0ac19fbe943dd7" dependencies = [ "bitflags", "bytemuck", diff --git a/src/rust/Cargo.toml b/src/rust/Cargo.toml index 224646e60..10fd94d76 100644 --- a/src/rust/Cargo.toml +++ b/src/rust/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" font-types = { version = "0.*", optional = true } read-fonts = { version = "0.*", optional = true } skrifa = { version = "0.*", optional = true } -harfruzz = { git = "https://github.com/harfbuzz/harfruzz", optional = true } +harfruzz = { git = "https://github.com/harfbuzz/harfruzz", rev = "006472176ab87e3a84e799e74e0ac19fbe943dd7", optional = true } [lib] name = "harfbuzz_rust" diff --git a/src/rust/shape.rs b/src/rust/shape.rs index bb3e1c67f..a4c0b8875 100644 --- a/src/rust/shape.rs +++ b/src/rust/shape.rs @@ -12,7 +12,7 @@ use harfruzz::{Face, FontRef, ShaperFont}; pub struct HBHarfRuzzFaceData<'a> { face_blob: *mut hb_blob_t, font_ref: FontRef<'a>, - shaper_font: Box, + shaper_font: ShaperFont, } #[no_mangle] @@ -29,7 +29,7 @@ pub unsafe extern "C" fn _hb_harfruzz_shaper_face_data_create_rs( Ok(f) => f, Err(_) => return null_mut(), }; - let shaper_font = Box::new(ShaperFont::new(&font_ref)); + let shaper_font = ShaperFont::new(&font_ref); let hr_face_data = Box::new(HBHarfRuzzFaceData { face_blob,