8000 Update unicode-script · unicode-rs/unicode-security@2299150 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2299150

Browse files
committed
Update unicode-script
1 parent 5bbb091 commit 2299150

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/mixed_script.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,11 @@ impl Default for AugmentedScriptSet {
7373

7474
impl AugmentedScriptSet {
7575
/// Intersect this set with another
76-
pub fn intersect(mut self, other: Self) -> Self {
77-
self.base = self.base.intersect(other.base);
76+
pub fn intersect_with(&mut self, other: Self) {
77+
self.base.intersect_with(other.base);
7878
self.hanb = self.hanb && other.hanb;
7979
self.jpan = self.jpan && other.jpan;
8080
self.kore = self.kore && other.kore;
81-
self
8281
}
8382

8483
/// Check if the set is empty
@@ -101,7 +100,7 @@ impl AugmentedScriptSet {
101100
pub fn for_str(s: &str) -> Self {
102101
let mut set = AugmentedScriptSet::default();
103102
for ch in s.chars() {
104-
set = set.intersect(ch.into())
103+
set.intersect_with(ch.into())
105104
}
106105
set
107106
}

0 commit comments

Comments
 (0)
0