cob: use underlying git_ext::Oid for serde
The use of bytes for serializing and deserializing was incorrect. It means that
the serializing and deserializing of ObjectId and the underyling
git_ext::Oid, which tends to cause issues with consumers of the API.
Change the Serialize and Deserialize implementations to defer to the
git_ext::Oid implementations.
Add qcheck tests to ensure that these two types are compatible.
1 file changed
+78
-4
ccc0297b
→
d77b537d
modified radicle-cob/src/object.rs
@@ -78,7 +78,7 @@ impl Serialize for ObjectId {
|
|
|
|
|
|
| - | |
| + | |
|
|
|
|
|
@@ -87,9 +87,38 @@ impl<'de> Deserialize<'de> for ObjectId {
|
|
|
|
|
|
| - | |
| - | |
| - | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
|
|
|
|
|
@@ -108,3 +137,48 @@ impl From<ObjectId> for RefString {
|
|
|
|
|
|
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |
| + | |