Skip to content

Commit

Permalink
add debug impl
Browse files Browse the repository at this point in the history
  • Loading branch information
cairoIover committed Jan 4, 2025
1 parent 85acc21 commit cbc186d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions corelib/src/ops/range.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,15 @@ pub impl RangeInclusiveOpImpl<T> of RangeInclusiveOp<T> {
}
}

impl RangeInclusiveDebug<T, impl TDebug: crate::fmt::Debug<T>> of crate::fmt::Debug<RangeInclusive<T>> {
fn fmt(self: @RangeInclusive<T>, ref f: crate::fmt::Formatter) -> Result<(), crate::fmt::Error> {
self.start.fmt(ref f)?;
write!(f, "..=")?;
self.end.fmt(ref f)?;
Result::Ok(())
}
}

impl RangeInclusiveIteratorImpl<
T, +One<T>, +Add<T>, +Copy<T>, +Drop<T>, +PartialEq<T>, +PartialOrd<T>,
> of Iterator<RangeInclusiveIterator<T>> {
Expand Down

0 comments on commit cbc186d

Please sign in to comment.