Skip to content

Commit b5f17e1

Browse files
committed
Add RangeTo
1 parent eb4b8d2 commit b5f17e1

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/impls.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,15 @@ where
522522
}
523523
}
524524

525+
impl<Idx> Format for core::ops::RangeTo<Idx>
526+
where
527+
Idx: Format,
528+
{
529+
fn format(&self, fmt: Formatter) {
530+
defmt::write!(fmt, "..{}", self.end)
531+
}
532+
}
533+
525534
impl<Idx> Format for core::ops::RangeToInclusive<Idx>
526535
where
527536
Idx: Format,

0 commit comments

Comments
 (0)