mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 16:57:58 +00:00
Add MaxEncodedLen to implement_fixed! (#10768)
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
committed by
GitHub
parent
ba3255376e
commit
dbb3f24e3e
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user