Skip to content

Commit

Permalink
rebase reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
cairoIover committed Jan 9, 2025
1 parent 236ac52 commit f6e94ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 16 deletions.
14 changes: 7 additions & 7 deletions corelib/src/ops.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ mod arith;
pub use arith::{AddAssign, DivAssign, MulAssign, RemAssign, SubAssign};

mod deref;
pub use deref::Deref;
#[feature("deref_mut")]
pub use deref::DerefMut;
pub use deref::Deref;

mod range;
pub use range::{Range, RangeInclusive, RangeInclusiveIterator, RangeIterator, RangeTrait};
// `RangeOp` and `RangeInclusiveOp` are used internally by the compiler.
#[allow(unused_imports)]
use range::{RangeInclusiveOp, RangeOp};

mod function;
pub use function::{Fn, FnOnce};

pub mod index;
pub use index::{Index, IndexView};

mod range;
// `RangeOp` and `RangeInclusiveOp` are used internally by the compiler.
#[allow(unused_imports)]
use range::{RangeInclusiveOp, RangeOp};
pub use range::{Range, RangeInclusive, RangeInclusiveIterator, RangeIterator, RangeTrait};
16 changes: 7 additions & 9 deletions corelib/src/ops/range.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,12 @@ 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> {
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)?;
Expand Down Expand Up @@ -206,13 +210,7 @@ impl RangeInclusiveIteratorImpl<
}

pub impl RangeInclusiveIntoIterator<
T,
+One<T>,
+Add<T>,
+Copy<T>,
+Drop<T>,
+PartialEq<T>,
+PartialOrd<T>,
T, +One<T>, +Add<T>, +Copy<T>, +Drop<T>, +PartialEq<T>, +PartialOrd<T>,
> of IntoIterator<RangeInclusive<T>> {
type IntoIter = RangeInclusiveIterator<T>;

Expand Down

0 comments on commit f6e94ca

Please sign in to comment.