You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Description
## Problem\*
Resolves#4827
## Summary\*
We're currently not implementing the `Eq` trait on `BoundedVec`, which
is added in this PR.
I've opted for ignoring differences in the storage array past `len` as
while it's not possible to have non-zeroed entries past this index if
you use the proper interface, it's possible to construct `BoundedVec`s
for which this is not the case. Once we allow proper encapsulation of
the internal state then we could simply check that the underlying
storage is equal.
## Additional Context
## Documentation\*
Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.
# PR Checklist\*
- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
---------
Co-authored-by: jfecher <[email protected]>
Problem
I have a function that returns
BoundedVec
and I want to write a test for it, but can't useassert_eq
becauseBoundedVec
does not implementEq
Happy Case
assert_eq
works onBoundedVec
Project Impact
Nice-to-have
Impact Context
No response
Workaround
Yes
Workaround Description
Compare manually field-by-field
Additional Context
No response
Would you like to submit a PR for this Issue?
None
Support Needs
No response
The text was updated successfully, but these errors were encountered: