From 80526e0608833c10dbd3f57b403a32d524f04bdb Mon Sep 17 00:00:00 2001 From: Daniel Sommermann Date: Wed, 13 Aug 2025 09:39:18 -0700 Subject: [PATCH] `ScriptExtension` now can represent combinations of scripts and Inherited/Common After finding the iterator after a union with Common only yielded a single element, I overhauled the representation and semantics of `ScriptExtension`. This is a breaking change for most APIs. Summary of improvements to `ScriptExtension`: * Improved representation to be able to track multiple scripts as well as Inherited/Common * "Inherited" and "Common" no longer intersect with everything and have no subset/superset relationship between them. * `for_str` is a union, not intersection, of all chars * Added `is_subset_or_equal()` for easier comparison of unions and intersections * Changed `Debug` impl to a vanilla derive to allow comparing hex bits * Fixed `Display` impl to properly show each script, separated by pluses * New test for iterator --- src/lib.rs | 214 ++++++++++++++++++++++++++++++++--------------------- 1 file changed, 129 insertions(+), 85 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index a8e3026..67a0ee0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -83,12 +83,10 @@ impl From