File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ impl Bson {
339
339
Bson :: Null => Value :: Null ,
340
340
Bson :: RegularExpression ( Regex { pattern, options } ) => {
341
341
let mut chars: Vec < _ > = options. chars ( ) . collect ( ) ;
342
- chars. sort ( ) ;
342
+ chars. sort_unstable ( ) ;
343
343
344
344
let options: String = chars. into_iter ( ) . collect ( ) ;
345
345
@@ -492,7 +492,7 @@ impl Bson {
492
492
ref options,
493
493
} ) => {
494
494
let mut chars: Vec < _ > = options. chars ( ) . collect ( ) ;
495
- chars. sort ( ) ;
495
+ chars. sort_unstable ( ) ;
496
496
497
497
let options: String = chars. into_iter ( ) . collect ( ) ;
498
498
@@ -602,7 +602,7 @@ impl Bson {
602
602
}
603
603
604
604
let mut keys: Vec < _ > = doc. keys ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ;
605
- keys. sort ( ) ;
605
+ keys. sort_unstable ( ) ;
606
606
607
607
match keys. as_slice ( ) {
608
608
[ "$oid" ] => {
@@ -712,7 +712,7 @@ impl Bson {
712
712
if let Ok ( pattern) = regex. get_str ( "pattern" ) {
713
713
if let Ok ( options) = regex. get_str ( "options" ) {
714
714
let mut options: Vec < _ > = options. chars ( ) . collect ( ) ;
715
- options. sort ( ) ;
715
+ options. sort_unstable ( ) ;
716
716
717
717
return Bson :: RegularExpression ( Regex {
718
718
pattern : pattern. into ( ) ,
Original file line number Diff line number Diff line change @@ -262,7 +262,7 @@ pub(crate) fn deserialize_bson_kvp<R: Read + ?Sized>(
262
262
let pattern = read_cstring ( reader) ?;
263
263
264
264
let mut options: Vec < _ > = read_cstring ( reader) ?. chars ( ) . collect ( ) ;
265
- options. sort ( ) ;
265
+ options. sort_unstable ( ) ;
266
266
267
267
Bson :: RegularExpression ( Regex {
268
268
pattern,
Original file line number Diff line number Diff line change @@ -110,7 +110,7 @@ struct RegexBody {
110
110
impl Regex {
111
111
pub ( crate ) fn parse ( self ) -> extjson:: de:: Result < crate :: Regex > {
112
112
let mut chars: Vec < _ > = self . body . options . chars ( ) . collect ( ) ;
113
- chars. sort ( ) ;
113
+ chars. sort_unstable ( ) ;
114
114
let options: String = chars. into_iter ( ) . collect ( ) ;
115
115
116
116
Ok ( crate :: Regex {
You can’t perform that action at this time.
0 commit comments