File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,20 @@ impl ScriptExtension {
45
45
///
46
46
/// "Common" (`Zyyy`) and "Inherited" (`Zinh`) are considered as intersecting
47
47
/// everything.
48
- pub fn intersect ( self , other : Self ) -> Self {
48
+ pub fn intersection ( & mut self , other : Self ) -> Self {
49
49
self . inner_intersect ( other)
50
50
}
51
51
52
+ /// Intersect this ScriptExtension with another ScriptExtension. Produces Unknown if things
53
+ /// do not intersect. This is equivalent to [`ScriptExtension::intersection`] but it stores the result
54
+ /// in `self`
55
+ ///
56
+ /// "Common" (`Zyyy`) and "Inherited" (`Zinh`) are considered as intersecting
57
+ /// everything.
58
+ pub fn intersect_with ( & mut self , other : Self ) {
59
+ * self = self . inner_intersect ( other)
60
+ }
61
+
52
62
/// Checks if the script extension is empty (unknown)
53
63
pub fn is_empty ( self ) -> bool {
54
64
self == ScriptExtension :: Single ( Script :: Unknown )
You can’t perform that action at this time.
0 commit comments