File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 58
58
- [ #421 ] : Fixed unknown bug in serde deserialization of externally tagged enums
59
59
when an enum variant represented as a ` Text ` event (i.e. ` <xml>tag</xml> ` )
60
60
and a document encoding is not an UTF-8
61
+ - [ #434 ] : Fixed incorrect error generated in some cases by serde deserializer
61
62
62
63
### Misc Changes
63
64
158
159
- [ #363 ] : Add tests for ` Reader::read_event_impl ` to ensure that proper events generated for corresponding inputs
159
160
- [ #407 ] : Improved benchmark suite to cover whole-document parsing, escaping and unescaping text
160
161
- [ #418 ] : Parameterized macrobenchmarks and comparative benchmarks, added throughput measurements via criterion
162
+ - [ #434 ] : Added more tests for serde deserialier
161
163
162
164
[ #8 ] : https://github.com/Mingun/fast-xml/pull/8
163
165
[ #9 ] : https://github.com/Mingun/fast-xml/pull/9
178
180
[ #418 ] : https://github.com/tafia/quick-xml/pull/418
179
181
[ #421 ] : https://github.com/tafia/quick-xml/pull/421
180
182
[ #423 ] : https://github.com/tafia/quick-xml/pull/423
183
+ [ #434 ] : https://github.com/tafia/quick-xml/pull/434
181
184
[ #437 ] : https://github.com/tafia/quick-xml/pull/437
182
185
183
186
## 0.23.0 -- 2022-05-08
Original file line number Diff line number Diff line change @@ -298,7 +298,13 @@ where
298
298
} ;
299
299
key. map ( Some )
300
300
}
301
- _ => Ok ( None ) ,
301
+ // Stop iteration after reaching a closing tag
302
+ DeEvent :: End ( e) if e. name ( ) == self . start . name ( ) => Ok ( None ) ,
303
+ // This is a unmatched closing tag, so the XML is invalid
304
+ DeEvent :: End ( e) => Err ( DeError :: UnexpectedEnd ( e. name ( ) . as_ref ( ) . to_owned ( ) ) ) ,
305
+ // We cannot get `Eof` legally, because we always inside of the
306
+ // opened tag `self.start`
307
+ DeEvent :: Eof => Err ( DeError :: UnexpectedEof ) ,
302
308
}
303
309
}
304
310
}
You can’t perform that action at this time.
0 commit comments