Add `MaxEncodedLen` to `implement_fixed!`
@@ -369,6 +369,7 @@ macro_rules! implement_fixed {
Default,
Copy,
Clone,
+ codec::MaxEncodedLen,
PartialEq,
Eq,
PartialOrd,
@@ -667,6 +668,15 @@ macro_rules! implement_fixed {
assert!($name::DIV > 0);
}
+ #[test]
+ fn has_max_encoded_len() {
+ struct AsMaxEncodedLen<T: codec::MaxEncodedLen> {
+ _data: T,
+ }
+
+ let _ = AsMaxEncodedLen { _data: $name::min_value() };
+ }
+
#[test]
fn from_i129_works() {
let a = I129 { value: 1, negative: true };
