From c632df57769e66881f3a8b6a99c2dbe5c9d43a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lech=20G=C5=82owiak?= Date: Mon, 19 Aug 2024 11:29:40 +0200 Subject: [PATCH] Update substrate/primitives/consensus/slots/src/lib.rs Co-authored-by: Davide Galassi --- substrate/primitives/consensus/slots/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/substrate/primitives/consensus/slots/src/lib.rs b/substrate/primitives/consensus/slots/src/lib.rs index 433bde48dcf7..dfa46fcf2571 100644 --- a/substrate/primitives/consensus/slots/src/lib.rs +++ b/substrate/primitives/consensus/slots/src/lib.rs @@ -91,7 +91,9 @@ impl Slot { Slot(timestamp.as_millis() / slot_duration.as_millis()) } - /// Timestamp of the start of the slot. Returns None if would overflow for given SlotDuration. + /// Timestamp of the start of the slot. + /// + /// Returns `None` if would overflow for given `SlotDuration`. pub fn timestamp(&self, slot_duration: SlotDuration) -> Option { slot_duration.as_millis().checked_mul(self.0).map(Timestamp::new) }