File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,7 @@ impl TryFrom<serde_json::Map<String, serde_json::Value>> for Bson {
94
94
95
95
if obj. contains_key ( "$regularExpression" ) {
96
96
let regex: models:: Regex = serde_json:: from_value ( obj. into ( ) ) ?;
97
- return Ok ( regex. parse ( ) ? . into ( ) ) ;
97
+ return Ok ( regex. parse ( ) . into ( ) ) ;
98
98
}
99
99
100
100
if obj. contains_key ( "$numberInt" ) {
@@ -136,7 +136,7 @@ impl TryFrom<serde_json::Map<String, serde_json::Value>> for Bson {
136
136
137
137
if obj. contains_key ( "$timestamp" ) {
138
138
let ts: models:: Timestamp = serde_json:: from_value ( obj. into ( ) ) ?;
139
- return Ok ( ts. parse ( ) ? . into ( ) ) ;
139
+ return Ok ( ts. parse ( ) . into ( ) ) ;
140
140
}
141
141
142
142
if obj. contains_key ( "$date" ) {
Original file line number Diff line number Diff line change @@ -108,15 +108,15 @@ struct RegexBody {
108
108
}
109
109
110
110
impl Regex {
111
- pub ( crate ) fn parse ( self ) -> extjson :: de :: Result < crate :: Regex > {
111
+ pub ( crate ) fn parse ( self ) -> crate :: Regex {
112
112
let mut chars: Vec < _ > = self . body . options . chars ( ) . collect ( ) ;
113
113
chars. sort_unstable ( ) ;
114
114
let options: String = chars. into_iter ( ) . collect ( ) ;
115
115
116
- Ok ( crate :: Regex {
116
+ crate :: Regex {
117
117
pattern : self . body . pattern ,
118
118
options,
119
- } )
119
+ }
120
120
}
121
121
}
122
122
@@ -214,11 +214,11 @@ pub(crate) struct TimestampBody {
214
214
}
215
215
216
216
impl Timestamp {
217
- pub ( crate ) fn parse ( self ) -> extjson :: de :: Result < crate :: Timestamp > {
218
- Ok ( crate :: Timestamp {
217
+ pub ( crate ) fn parse ( self ) -> crate :: Timestamp {
218
+ crate :: Timestamp {
219
219
time : self . body . t ,
220
220
increment : self . body . i ,
221
- } )
221
+ }
222
222
}
223
223
}
224
224
You can’t perform that action at this time.
0 commit comments