-
Notifications
You must be signed in to change notification settings - Fork 2
Use scale-encode and scale-decode, and enable zero-copy decoding via Visitor trait #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8a0c75b
update to use latest scale-decode (from branch)
jsdw 05c472b
dep from git branch, not local
jsdw 1fbc5a5
zero-length composites always unnamed
jsdw 7872209
reqrite Value encoding to lean on EncodeAsType for encoding parity wi…
jsdw 297a91d
Value to impl IntoVisitor too (to get DecodeAsType), and remove TypeI…
jsdw 8e31bd3
use scale-encode 0.0.17
jsdw 0b7f1c8
fix path change in scale-encode
jsdw 97e2daa
EncodeAsFields and DecodeAsFields impls
jsdw 3017d8b
consume any leftover bytes just incase
jsdw 4bf80f6
consume bytes fully when decode_as_fields
jsdw 40d8b34
scale-decode only on Composite, not Value
jsdw 108573c
Custom Composite encoding; don't rely on scale_encode::Composite so much
jsdw e2414d3
bump scale-encode to 0.0.18
jsdw 910ab14
bump scale-encode to 0.1
jsdw 0bccbc9
Have a pass over the docs
jsdw 0fbc780
tabs to spaces to make doc comment writing less annoying/for consiste…
jsdw 91edfc1
actually run doc tests in CI
jsdw c9439ff
tweak release notes to ensure doc tests are run
jsdw 77ea82f
add codeowners file
jsdw a7185e3
fix failing doc test
jsdw 18d30b3
be a little more defensive and skip bytes even if our visitor impl er…
jsdw cbdc8b3
fix doc typo
jsdw 3fbfc07
use released version of scale-decode
jsdw 2c23eb5
nits and fixes, and remove stray tabs that cargo fmt doesn't seem to …
jsdw cba75f2
Actually, use matches and avoid expects
jsdw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -136,6 +136,12 @@ jobs: | |
| command: test | ||
| args: --all-targets --workspace | ||
|
|
||
| - name: Cargo test docs | ||
| uses: actions-rs/[email protected] | ||
| with: | ||
| command: test | ||
| args: --doc --workspace | ||
|
|
||
| clippy: | ||
| name: Cargo clippy | ||
| runs-on: ubuntu-latest | ||
|
|
||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,5 @@ | ||
| hard_tabs = true | ||
| hard_tabs = false | ||
| tab_spaces = 4 | ||
| max_width = 100 | ||
| use_small_heuristics = "Max" | ||
| edition = "2021" | ||
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| # main codeowner @paritytech/tools-team | ||
| * @paritytech/tools-team | ||
|
|
||
| # CI | ||
| /.github/ @paritytech/ci @paritytech/tools-team |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👀
are you tired of tabs? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mainly just that subxt, scale-decode and scale-encode all use spaces :)
But also, a really annoying thing I run into with tabs is making doc examples; I can't remember the exact issue but something like the IDE tries to make things tabs but cargo complains about tabs in doc comments; either way it all "just works" with spaces I guess (and spaces also seem to be the default anyway)