Skip to content

Commit

Permalink
Ensuring position is reported on all de errors
Browse files Browse the repository at this point in the history
Internally, the serde deserializer implementation uses the existing
error type, renamed as DeserializerError. Now, Deserializer returns a
new type Error that always has a range. At the boundaries of where
deserialization happens, if the location is empty, we fill it with
the parser's current offset.
  • Loading branch information
ecton committed May 16, 2023
1 parent 3e85f0a commit 492cabc
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 56 deletions.
5 changes: 5 additions & 0 deletions examples/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,8 @@ fn main() {
let pretty = rsn::to_string_pretty(&posts);
println!("Pretty form:\n{pretty}");
}

#[test]
fn runs() {
main();
}

0 comments on commit 492cabc

Please sign in to comment.