- 06 Apr, 2021 1 commit
-
-
Bastian Köcher authored
* Adds support for custom where bounds The user can now specify a custom where bound when using the derive macros: - `#[codec(encode_bound(T: Encode))]` for `Encode` - `#[codec(decode_bound(T: Encode))]` for `Decode` If nothing is specified (`encode_bound()`) the where bounds will be empty. * Apply suggestions from code review * Apply suggestions from code review Co-authored-by:
Gavin Wood <gavin@parity.io>
-
- 25 Jan, 2021 1 commit
-
-
thiolliere authored
Co-authored-by:
Andronik Ordian <write@reusable.software> Co-authored-by:
Bastian Köcher <bkchr@users.noreply.github.com>
-
- 14 Jan, 2021 1 commit
-
-
thiolliere authored
-
- 12 Jan, 2021 1 commit
-
-
thiolliere authored
-
- 30 May, 2020 1 commit
-
-
Aaron Hill authored
Normally, the span of a field has the same hygiene context as `Span::call_site`. However, it's possible for a struct definition to be 'constructed' via a `macro_rules` macro such that the field has a different hygiene context. This will cause the expanded code to be unable to resolve any references to `self`, resulting in a compilation error. This pull request uses `quote!` instead of `quote_spanned!` when emitting a 'self' identifier. `quote_spanned!` is still used for everything else in the emitted method, meaning that error messages will still point to the proper field. I've included a test case which triggers this issue on Rust 1.43.1. It's current difficult to hit this issue other than in this artificial case, but that will change once rust-lang/rust#72622 is re-landed.
-
- 08 Apr, 2020 1 commit
-
-
thiolliere authored
* add check for attribute and modify index attribute * fmt * improve doc * improve doc * add custom error message
-
- 02 Apr, 2020 1 commit
-
-
thiolliere authored
* impl return error for decode_from in CompactAs trait * update readme * update doc test and readme
-
- 23 Feb, 2020 1 commit
-
-
Bastian Köcher authored
* Extend the benchmarks * Optimize encoding/decoding of primitive type vectors * Adds a benchmark for a complex type * Optimize `u8` and `i8` * Implement some more `size_hint` and improve array `encode_to` * Fix the range...
-
- 13 Nov, 2019 1 commit
-
-
Qinxuan Chen authored
* Update dependencies Signed-off-by:
koushiro <koushiro.cqx@gmail.com> * Update Signed-off-by:
koushiro <koushiro.cqx@gmail.com> * Revert some deps; Fix some warnings Signed-off-by:
koushiro <koushiro.cqx@gmail.com> * Improve utils of derive Signed-off-by:
koushiro <koushiro.cqx@gmail.com> * Bump bitvec to 0.15 Signed-off-by:
koushiro <koushiro.cqx@gmail.com> * Improve utils of derive Signed-off-by:
koushiro <koushiro.cqx@gmail.com>
-
- 25 Sep, 2019 1 commit
-
-
Bastian Köcher authored
* Implement `dumb_trait_bound` attribute * Document derive attributes * Update README
-
- 24 Sep, 2019 1 commit
-
-
Bastian Köcher authored
-
- 25 Jul, 2019 1 commit
-
-
thiolliere authored
* impl bound to input_len * typo * fix + doc * fix * hide alloc * address issues
-
- 21 Jul, 2019 1 commit
-
-
thiolliere authored
* fix io reader * Revert "Implement min_encoded_len and required_len (#119)" This reverts commit 2b66d2ce.
-
- 17 Jul, 2019 2 commits
-
-
-
thiolliere authored
-
- 05 Jun, 2019 1 commit
-
-
Gautam Dhameja authored
* Documentation for Parity SCALE Codec. * addressed review comments on docs * added example for CompactAs and fixed a test * minor fixes
-
- 04 Jun, 2019 1 commit
-
-
Bastian Köcher authored
* Rename to `parity-scale-codec` and revert version to 1.0 * Fix compilation after renaming * Fix benchmarks * Update src/lib.rs Co-Authored-By:
thiolliere <gui.thiolliere@gmail.com> * Remove last parity-codec leftovers
-
- 03 Jun, 2019 1 commit
-
-
thiolliere authored
Encode/Decode has now a new associated const that tells if the type is u8, that allow some kind of specialization when implementing Encode/Decode for `Vec<u8>`
-
- 02 Apr, 2019 1 commit
-
-
Bastian Köcher authored
* release parity-codec v3.2 * impl skip fields and variants (#58) * impl skip variants * impl skip on fields * reorganize code * in code rename Co-Authored-By:
thiolliere <gui.thiolliere@gmail.com> * in code rename * code refactor * refactor: variant filter * new version of derive (#61) * release codec-v3.3 that forward derive-v3.2 (#63) * Implement derive for empty enums * Bump version of parity-codec-derive to 3.3 * Fixes test
-
- 08 Mar, 2019 1 commit
-
-
Fedor Sakharov authored
* decode returns Result instead of Option Fixes #33 * don't use String inside Error * some fixes to formatting and error messages * fix review * implements std::error::Error and std::fmt::Display for Error * removes implementation of ToString * fixes error message for decoding Enum * generate error messages with format!() outside of the quote!() * refactors error message generation * adds simple sanity tests * adds from str implementation for error * adds tests for named structs fields * remove all the literal error messages from no_std builds * brings back PartialEq lost along the way * fix review v3
-
- 28 Feb, 2019 1 commit
-
-
Bastian Köcher authored
* Work around a compiler bug that does not like self recursive where clauses * Some code refactor * Adds missing new lines
-
- 12 Feb, 2019 2 commits
-
-
* Make use of `proc-macro-crate` * use syntax of rust 2018
-
thiolliere authored
-
- 08 Feb, 2019 2 commits
-
-
Dmitry Kashitsyn authored
* Fixes test * Refactors panics to compile errors
-
Dmitry Kashitsyn authored
* Adds trait bounds based on used types * Adds test * Cleans up the code * Cleans up the code, attempts to add spanned errors * Fixes error reporting * Adds non-encodable type to the test * Apply suggestions from code review Co-Authored-By:
0x7CFE <korvin@deeptown.org> * Fix typo Co-Authored-By:
0x7CFE <korvin@deeptown.org>
-
- 18 Jan, 2019 1 commit
-
-
thiolliere authored
-
- 16 Jan, 2019 1 commit
-
-
Bastian Köcher authored
-
- 20 Nov, 2018 1 commit
-
-
Bastian Köcher authored
-
- 16 Oct, 2018 1 commit
-
-
Bastian Köcher authored
-
- 12 Oct, 2018 2 commits
-
-
Bastian Köcher authored
-
Bastian Köcher authored
-
- 11 Oct, 2018 3 commits
-
-
Bastian Köcher authored
-
Bastian Köcher authored
-
Shawn Tabrizi authored
-
- 10 Oct, 2018 1 commit
-
-
Shawn Tabrizi authored
-
- 27 Sep, 2018 2 commits
-
-
Bastian Köcher authored
-
Bastian Köcher authored
`parity-codec-derive` now just requires `parity-codec` in the `Cargo.toml`. Before that, it required that `parity-codec` was imported as `codec`. We now just the same tricks as Serde, to implement `Encode` and `Decode`.
-
- 20 Sep, 2018 1 commit
-
-
Benjamin Kampmann authored
-
- 13 Sep, 2018 1 commit
-
-
Gav authored
-
- 12 Sep, 2018 1 commit
-
-
* Remove unneeded script * Rename Substrate Demo -> Substrate * Rename demo -> node * Build wasm from last rename. * Merge ed25519 into substrate-primitives * Minor tweak * Rename substrate -> core * Move substrate-runtime-support to core/runtime/support * Rename/move substrate-runtime-version * Move codec up a level * Rename substrate-codec -> parity-codec * Move environmental up a level * Move pwasm-* up to top, ready for removal * Remove requirement of s-r-support from s-r-primitives * Move core/runtime/primitives into core/runtime-primitives * Remove s-r-support dep from s-r-version * Remove dep of s-r-support from bft * Remove dep of s-r-support from node/consensus * Sever all other core deps from s-r-support * Forgot the no_std directive * Rename non-SRML modules to sr-* to avoid match clashes * Move runtime/* to srml/* * Rename substrate-runtime-* -> srml-* * Move srml to top-level
-