- 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>
-
- 26 Feb, 2021 1 commit
-
-
thiolliere authored
Co-authored-by:
Bastian Köcher <bkchr@users.noreply.github.com>
-
- 26 Jan, 2021 1 commit
-
-
thiolliere authored
-
- 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
-
- 04 Jan, 2021 1 commit
-
-
David authored
-
- 10 Sep, 2020 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
-
- 03 Mar, 2020 2 commits
-
-
Bastian Köcher authored
-
thiolliere authored
* add doc
-
- 20 Dec, 2019 1 commit
-
-
Bastian Köcher authored
-
- 09 Dec, 2019 1 commit
-
-
thiolliere authored
-
- 06 Dec, 2019 1 commit
-
-
thiolliere authored
Co-Authored-By:
Bastian Köcher <bkchr@users.noreply.github.com>
-
- 13 Nov, 2019 2 commits
-
-
Bastian Köcher authored
* Increase version to `1.1` and release * Use correct version format * Fixes build and require explicit versions
-
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>
-
- 27 Sep, 2019 1 commit
-
-
thiolliere authored
-
- 26 Sep, 2019 1 commit
-
-
thiolliere authored
-
- 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
-
- 29 Jul, 2019 2 commits
-
-
thiolliere authored
* few more type * update versions
-
Bastian Köcher authored
* Add `EncodeLike` * Some stuff * Make it work * Review feedback * Add example * Update README * Add bound
-
- 25 Jul, 2019 1 commit
-
-
thiolliere authored
* impl bound to input_len * typo * fix + doc * fix * hide alloc * address issues
-
- 24 Jul, 2019 1 commit
-
-
thiolliere authored
* derive full single optimisation * refactor
-
- 21 Jul, 2019 1 commit
-
-
thiolliere authored
* fix io reader * Revert "Implement min_encoded_len and required_len (#119)" This reverts commit 2b66d2ce.
-
- 19 Jul, 2019 1 commit
-
-
thiolliere authored
-
- 17 Jul, 2019 1 commit
-
-
thiolliere authored
-
- 12 Jun, 2019 1 commit
-
-
Andrew Jones authored
* Basic CompactAs derive * Support single field named structs * Extract function to wrap impl in dummy const * Support single non-skipped field * Restore original include_parity_scale_codec_crate function * Add test for Compact<T> codec
-
- 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
-
- 15 Apr, 2019 1 commit
-
-
Bastian Köcher authored
We can not just use `usize`, because `quote!` converts `let i: usize = 0;` to `0usize` and this is not accepted as field accessor.
-
- 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
-
- 01 Apr, 2019 1 commit
-
-
thiolliere authored
* 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 * impl skip variant and fields
-
- 12 Mar, 2019 1 commit
-
-
thiolliere authored
* forward encoding for single field struct * code refactor
-
- 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 2 commits
-
-
Bastian Köcher authored
-
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 1 commit
-
-
Dmitry Kashitsyn authored
* Fixes test * Refactors panics to compile errors
-