We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AFAICT MaxEncodedLen doesn't read the attributes #[codec(skip)] and #[codec(encode_as..)] and #[codec(compact)].
#[codec(skip)]
#[codec(encode_as..)]
#[codec(compact)]
Thus it can result in an inaccurate len.
For instance the type:
#[derive(MaxEncodedLen, Encode)] struct Foo(#[codec(compact)] u8);
will have max encoded len of 1 but can actually encode in 2 bytes.
The text was updated successfully, but these errors were encountered:
Still an issue. This fails to compile:
#[derive(MaxEncodedLen, TypeInfo, Encode, Decode)] enum Error { Wrong(#[codec(skip)] &'static str), }
no function or associated item named "max_encoded_len" found for reference "&'static str" in the current scope. Same when using a named inner.
no function or associated item named "max_encoded_len" found for reference "&'static str" in the current scope
inner
Sorry, something went wrong.
At least codec(skip) is already supported, but just not released. This changes it: #401
codec(skip)
This issue is part of paritytech/polkadot-sdk#323 in a list. And looks like it's fixed.
No branches or pull requests
AFAICT MaxEncodedLen doesn't read the attributes
#[codec(skip)]
and#[codec(encode_as..)]
and#[codec(compact)]
.Thus it can result in an inaccurate len.
For instance the type:
will have max encoded len of 1 but can actually encode in 2 bytes.
The text was updated successfully, but these errors were encountered: