Skip to content

Commit

Permalink
fix generic
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelleyrtp committed Jan 8, 2025
1 parent 193bb85 commit d9a7ea6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/web/src/hydration/deserialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,10 @@ impl HTMLDataCursor {
return Ok(None);
};

ciborium::from_reader(Cursor::new(bytes))
.map_err(|err| self.make_detailed_deserialize_error::<T>(current, err))
match ciborium::from_reader::<T, _>(Cursor::new(bytes)) {
Ok(x) => Ok(Some(x)),
Err(err) => Err(self.make_detailed_deserialize_error::<T>(current, err)),
}
}

fn make_detailed_deserialize_error<T: DeserializeOwned>(
Expand Down

0 comments on commit d9a7ea6

Please sign in to comment.