mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
perf(regexp): remove unnecessary sort (#1402)
This commit is contained in:
parent
75eb708526
commit
f5894b636b
1 changed files with 3 additions and 4 deletions
|
|
@ -1869,16 +1869,15 @@ impl<'a> Format<'a> for RegExpFlags {
|
|||
if self.contains(Self::S) {
|
||||
string.push('s');
|
||||
}
|
||||
if self.contains(Self::V) {
|
||||
string.push('v');
|
||||
}
|
||||
if self.contains(Self::U) {
|
||||
string.push('u');
|
||||
}
|
||||
if self.contains(Self::V) {
|
||||
string.push('v');
|
||||
}
|
||||
if self.contains(Self::Y) {
|
||||
string.push('y');
|
||||
}
|
||||
string.sort_unstable();
|
||||
p.str(&string.iter().collect::<String>())
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue