{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":546392875,"defaultBranch":"main","name":"bcs","ownerLogin":"zefchain","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-10-06T02:23:46.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/95990825?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1665023868.9211168","currentOid":""},"activityList":{"items":[{"before":"023659548e6a3f35e2bd0e7078af2e15b7ff7e12","after":"1d03bda49fd006289352c0e022aee4d71945668b","ref":"refs/heads/main","pushedAt":"2023-10-13T03:12:55.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"prepare release 0.1.6","shortMessageHtmlLink":"prepare release 0.1.6"}},{"before":"f61e06b2e207957ea203c077622c3e8a3f6cc395","after":"023659548e6a3f35e2bd0e7078af2e15b7ff7e12","ref":"refs/heads/main","pushedAt":"2023-10-13T02:55:20.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"minor improvements in recently added test","shortMessageHtmlLink":"minor improvements in recently added test"}},{"before":"56cfe8941e0fc589e8a14b14f96cde743ddf7699","after":"f61e06b2e207957ea203c077622c3e8a3f6cc395","ref":"refs/heads/main","pushedAt":"2023-10-13T02:54:44.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"test","shortMessageHtmlLink":"test"}},{"before":"aef9579a6028bd5e44c0051b9f97d468bc990c0d","after":"56cfe8941e0fc589e8a14b14f96cde743ddf7699","ref":"refs/heads/main","pushedAt":"2023-10-13T02:25:34.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"Implement BCS deserialization from_reader (#6)\n\n* Implement BCS deserialization from_reader\r\n\r\n** Strategy **\r\nThe commit aims to maintain a minimal diff over the previous implementation. To that end, the following changes have been made.\r\n- Make `Deserializer` generic over an inner type `R`\r\n- Factor as much of the implementation as possible into a new trait `BcsReader`, which implements BCS in terms of a few primitive operations. Implement `serde::Deserialize<'de> for Deserializer where Deserializer: BcsReader<'de>`\r\n- Implement `BcsReader<'de>` for `Deserializer<&'de [u8]>` using existing code\r\n- Implement `BcsReader` generically for (a version of) `Deserializer`.\r\n\r\nThe existing implementation is very close to supporting deserialization from readers. There are only two places in which its behavior relied on access to a byte slice was in the implementation of `de::MapAccess`.\r\n\r\nThe first case is `map` deserialization. `bcs` needs access to the serialized representation of map keys in order to enforce canonicity. When deserializing from a slice, this is straightforward - the implementation can simply deserialize a map key, and then \"look back\" at the original input slice to determine its serialized representation. When deserializing from a reader, however, this kind of rewinding is not generally possible. To solve this problem, I introduce a the `TeeReader` struct, which wraps a `Read`er and optionally copies its bytes into a `capture_buffer` for later retrieval. Then, I simply implement `BcsReader` for `Deserializer>`.\r\n\r\nThe second case is the `end` method, which checks that all input bytes have been consumed. To handle this case, I simply attempt to read one extra byte from the `Read`er after deserialization and assert that an EOF error is returned from the underlying `Read`er.\r\n\r\n** Testing **\r\nAll existing unit tests except for `zero_copy_parse` have been modified to test that deserialization `from_bytes` and `from_reader` yield the same output. That test is not applicable since readers are not capable of zero-copy deserialization.","shortMessageHtmlLink":"Implement BCS deserialization from_reader (#6)"}},{"before":"57e7e657baf6b140f5054eda27cc2af66912b3c9","after":"aef9579a6028bd5e44c0051b9f97d468bc990c0d","ref":"refs/heads/main","pushedAt":"2023-10-07T23:39:52.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"bump MSRV to support Rust 2021","shortMessageHtmlLink":"bump MSRV to support Rust 2021"}},{"before":"daea8999038ca80111985ab63f465fb122c36cc2","after":"57e7e657baf6b140f5054eda27cc2af66912b3c9","ref":"refs/heads/main","pushedAt":"2023-10-07T23:21:08.000Z","pushType":"push","commitsCount":2,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"migrate to Rust 1.73 and pin version in CI","shortMessageHtmlLink":"migrate to Rust 1.73 and pin version in CI"}},{"before":"97bf218540a0413d43d4bc4ade7abcc8ae815958","after":"daea8999038ca80111985ab63f465fb122c36cc2","ref":"refs/heads/main","pushedAt":"2023-10-07T23:12:42.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"ma2bd","name":"Mathieu Baudet","path":"/ma2bd","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1105398?s=80&v=4"},"commit":{"message":"prepare release of BCS 0.1.5","shortMessageHtmlLink":"prepare release of BCS 0.1.5"}}],"hasNextPage":false,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAADlgwTxAA","startCursor":null,"endCursor":null}},"title":"Activity ยท zefchain/bcs"}