Skip to content

Commit

Permalink
Allow unsized context types in JSON array and object deserialization
Browse files Browse the repository at this point in the history
  • Loading branch information
zargony committed Oct 19, 2024
1 parent 9caf704 commit fbee7be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firmware/src/json/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ impl FromJson for Value {
/// next element.
pub trait FromJsonArray: Sized + Default {
/// Additional context information passed to deserialization
type Context;
type Context: ?Sized;

/// Read next array element from given JSON reader
async fn read_next<R: BufRead>(
Expand Down Expand Up @@ -454,7 +454,7 @@ impl<T: FromJson> FromJsonArray for Vec<T> {
/// next value.
pub trait FromJsonObject: Sized + Default {
/// Additional context information passed to deserialization
type Context;
type Context: ?Sized;

/// Read next object value from given JSON reader
async fn read_next<R: BufRead>(
Expand Down

0 comments on commit fbee7be

Please sign in to comment.