Skip to content
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

Fix the StorageVec type by excluding the len_cached field from its type info #2052

Merged
merged 4 commits into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
- Fix `TypeInfo` for the `len_cached` field of the `StorageVec` type - [#2052](https://github.com/paritytech/ink/pull/2052)

## Version 5.0.0-rc

Expand Down
4 changes: 2 additions & 2 deletions crates/storage/src/lazy/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ struct CachedLen(Cell<Option<u32>>);

#[cfg(feature = "std")]
impl scale_info::TypeInfo for CachedLen {
type Identity = Option<u32>;
type Identity = Self;

fn type_info() -> scale_info::Type {
<Self::Identity as scale_info::TypeInfo>::type_info()
<() as scale_info::TypeInfo>::type_info()
}
}

Expand Down
Loading