Skip to content

Commit

Permalink
Merge pull request #18 from dtolnay/humanreadable
Browse files Browse the repository at this point in the history
Preserve is_human_readable setting of wrapped deserializer
  • Loading branch information
dtolnay authored Jan 3, 2023
2 parents 4fbf256 + 3236fc7 commit af58422
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,10 @@ where
self.de
.deserialize_identifier(Wrap::new(visitor, self.callback, &self.path))
}

fn is_human_readable(&self) -> bool {
self.de.is_human_readable()
}
}

/// Wrapper that attaches context to a `Visitor`, `SeqAccess`, `EnumAccess` or
Expand Down Expand Up @@ -1009,6 +1013,10 @@ where
self.delegate
.deserialize_identifier(CaptureKey::new(visitor, self.key))
}

fn is_human_readable(&self) -> bool {
self.delegate.is_human_readable()
}
}

/// Forwarding impl that also saves the value of integers and strings.
Expand Down

0 comments on commit af58422

Please sign in to comment.