Derive MaxEncodedLen on SlotDuration (#2484)

# Description

Needed this in my code as part of the larger data structure.

---------

Co-authored-by: command-bot <>
This commit is contained in:
Nazar Mokrynskyi
2023-11-24 16:21:10 +02:00
committed by GitHub
parent 803ea76059
commit 07ea6da2d8
@@ -121,7 +121,20 @@ impl From<Slot> for u64 {
}
/// A slot duration defined in milliseconds.
#[derive(Clone, Copy, Debug, Encode, Decode, Hash, PartialOrd, Ord, PartialEq, Eq, TypeInfo)]
#[derive(
Clone,
Copy,
Debug,
Encode,
Decode,
MaxEncodedLen,
Hash,
PartialOrd,
Ord,
PartialEq,
Eq,
TypeInfo,
)]
pub struct SlotDuration(u64);
impl SlotDuration {