Repository navigation
fix: remove unneeded 'Deserialize' trait bound - #206
Conversation
|
needed to resolve oxidecomputer/progenitor#1261 |
|
@alexliesenfeld any thoughts on this one? this is a significant blocker for me downstream |
There was a problem hiding this comment.
Pull request overview
This PR removes unnecessary trait bounds from the json_body_obj methods to improve API ergonomics. The Deserialize trait bound was incorrectly required since the methods only serialize (via serde_json::to_value), and the implicit Sized bound can be relaxed to allow unsized types like str.
Changes:
- Removed unnecessary
Deserializetrait bound and associated lifetime parameter fromWhen::json_body_obj - Added
?Sizedtrait bound to bothWhen::json_body_objandThen::json_body_objto allow references to unsized types like&str - Refactored
Then::json_body_objto use a where clause for consistency
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
lgtm, thanks! Do you need a quick release? |
That would be amazing |
|
Ping @FalkWoldmann Is it possible to get a release? |
|
Hi @danieleades , we are still stabilizing the next release. Once our test pipeline is green, we will ship the next release. |
Anything I can do to help? |
the 'Deserialize' bound appears to simply be a mistake.
the implicit
Sizedbounds can be relaxed since the method accepts a reference, which is always sized.this allows passing
&strto the methods