From 5c537c651a30a8a676ac0ccecd30fdad4a9802d6 Mon Sep 17 00:00:00 2001 From: Laurenz Date: Wed, 6 Dec 2023 14:33:50 +0100 Subject: [PATCH] Make shape plan `Send` and `Sync`. --- src/complex/mod.rs | 2 +- src/plan.rs | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/complex/mod.rs b/src/complex/mod.rs index 1d1794b3..922ed479 100644 --- a/src/complex/mod.rs +++ b/src/complex/mod.rs @@ -74,7 +74,7 @@ pub struct ComplexShaper { /// Called at the end of `shape_plan()`. /// Whatever shapers return will be accessible through `plan.data()` later. - pub create_data: Option Box>, + pub create_data: Option Box>, /// Called during `shape()`. /// Shapers can use to modify text before shaping starts. diff --git a/src/plan.rs b/src/plan.rs index 32b5926e..9a2663c4 100644 --- a/src/plan.rs +++ b/src/plan.rs @@ -13,7 +13,7 @@ pub struct ShapePlan { pub(crate) shaper: &'static ComplexShaper, pub(crate) ot_map: ot::Map, pub(crate) aat_map: aat::Map, - data: Option>, + data: Option>, pub(crate) frac_mask: Mask, pub(crate) numr_mask: Mask, @@ -363,3 +363,14 @@ impl<'a> ShapePlanner<'a> { plan } } + +#[cfg(test)] +mod tests { + use super::ShapePlan; + + #[test] + fn test_shape_plan_is_send_and_sync() { + fn ensure_send_and_sync() {} + ensure_send_and_sync::(); + } +}