File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,20 @@ impl ScriptExtension {
4545 ///
4646 /// "Common" (`Zyyy`) and "Inherited" (`Zinh`) are considered as intersecting
4747 /// everything.
48- pub fn intersect ( self , other : Self ) -> Self {
48+ pub fn intersection ( & mut self , other : Self ) -> Self {
4949 self . inner_intersect ( other)
5050 }
5151
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+
5262 /// Checks if the script extension is empty (unknown)
5363 pub fn is_empty ( self ) -> bool {
5464 self == ScriptExtension :: Single ( Script :: Unknown )
You can’t perform that action at this time.
0 commit comments