-
-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🩹 🚸 zv:
Signature
equality regardless of outer parentheses
This commit adjusts the `PartialEq` impls to evaluate equality irrespective of of marshalling of the type. Two signatures representing the same type can differ as a result of D-Bus marshalling. D-Bus marshalling will omit outer parentheses from body singatures. Consider a `MyType { a: i32, b: i32}`: `MyType::signature()` returns a "(ii)" `Signature` whereas `Message::body_signature()` with `MyType` as body, would return a "ii" `Signature`, which may lead to unexpected inequality of `Signature`s. Note: `PartialEq` on `Signature` accounts for marshalling only. One can construct- or deserialize into deeper nested structs or tuples than than the signature describes but at that point the divergence is expected.
- Loading branch information
1 parent
ee7e2b2
commit c1456d4
Showing
2 changed files
with
80 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters