Add bitvec-like generic support to the scale-bits type for use in codegen (#718)

* Add bitvec-like generic support to the scale-bits type for use in codegen

* Use nightly 1.66 formatting

* Fix reading input while decoding bit sequences

* Add tests for our DecodedBits wrapper

* Add convenience DecodedBits::(in)to_bits functions

* Don't expose DecodedBits::bit_format

* Re-export scale_bits as peer dependency

* Move subxt::utils into a separate file

* Hide DecodedBits internals

* Don't re-export types from the `bits` module

* Update subxt/src/utils/bits.rs

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Update subxt/src/utils/bits.rs

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>

* Address review feedback

* Clarify the byte needed calculation in DecodedBits encoding

* Remove remaining dbg! invocations

Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
Igor Matuszewski
2022-11-24 15:09:20 +01:00
committed by GitHub
parent a80d6cfd30
commit f0ce26db7b
9 changed files with 273 additions and 28 deletions
+1 -1
View File
@@ -177,9 +177,9 @@ pub use crate::{
/// Re-export external crates that are made use of in the subxt API.
pub mod ext {
pub use bitvec;
pub use codec;
pub use frame_metadata;
pub use scale_bits;
pub use scale_value;
pub use sp_core;
pub use sp_runtime;