Repository navigation
Commit e3b4e32
authored
* fix(model): reject malformed JSON-RPC messages with conflicting result and error fields (#1283)
* fix(model): preserve Deserialize<'de> bounds for JsonRpcMessage
Keep the public Deserialize impl equivalent to the previous derive
(Deserialize<'de> bounds, Noti type param) so cargo public-api --deny
removed passes, while still rejecting conflicting result/error fields.
* fix(model): preserve borrowed JSON-RPC payload deserialization
Reject conflicting result/error shapes without forcing an owned
serde_json::Value intermediate for from_str/from_slice. Use serde_json's
RawValue newtype token so Deserialize<'de> payload types can keep
borrows into the original input, with an owned fallback for from_value.
Adds regression coverage for generic borrowed request/response payloads.
* fix(model): alias JsonRpcMessageVisitor PhantomData for clippy
Factor the PhantomData<fn() -> (Req, Resp, Noti)> marker into a type
alias so clippy::type_complexity no longer fails CI under -D warnings.
* fix(model): preserve JSON-RPC deserialization in untagged wrappers
* fix(model): use borrowing-compatible buffered message parsing
* fix(model): preserve public deserializer signature
* refactor(model): remove masked JSON-RPC shape errors
---------
Co-authored-by: ump45nose <>
1 parent 718bc60 commit e3b4e32
1 file changed
Lines changed: 524 additions & 1 deletion
0 commit comments