Skip to content

Commit 2e62c36

Browse files
authored
Merge pull request #32 from MathiasKoch/master
Handle whitespace before sequence in deserialization
2 parents 8de413e + 2cbfb20 commit 2e62c36

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/de/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ impl<'a, 'de> de::Deserializer<'de> for &'a mut Deserializer<'de> {
526526
where
527527
V: Visitor<'de>,
528528
{
529-
match self.peek().ok_or(Error::EofWhileParsingValue)? {
529+
match self.parse_whitespace().ok_or(Error::EofWhileParsingValue)? {
530530
b'[' => {
531531
self.eat_char();
532532
let ret = visitor.visit_seq(SeqAccess::new(self))?;
@@ -1051,7 +1051,6 @@ mod tests {
10511051

10521052
// See https://iot.mozilla.org/wot/#thing-resource
10531053
#[test]
1054-
#[ignore]
10551054
fn wot() {
10561055
#[derive(Debug, Deserialize, PartialEq)]
10571056
struct Thing<'a> {
@@ -1111,7 +1110,7 @@ mod tests {
11111110
properties: Properties {
11121111
temperature: Property {
11131112
ty: Type::Number,
1114-
unit: Some("celcius"),
1113+
unit: Some("celsius"),
11151114
description: Some("An ambient temperature sensor"),
11161115
href: "/properties/temperature",
11171116
},

0 commit comments

Comments
 (0)