diff --git a/compiler/rustc_index_macros/src/newtype.rs b/compiler/rustc_index_macros/src/newtype.rs index 939a744461477..67ec776113399 100644 --- a/compiler/rustc_index_macros/src/newtype.rs +++ b/compiler/rustc_index_macros/src/newtype.rs @@ -122,7 +122,7 @@ impl Parse for Newtype { #gate_rustc_only impl ::std::iter::Step for #name { #[inline] - fn steps_between(start: &Self, end: &Self) -> (usize,Option) { + fn steps_between(start: &Self, end: &Self) -> (usize, Option) { ::steps_between( &Self::index(*start), &Self::index(*end), diff --git a/library/core/src/iter/range.rs b/library/core/src/iter/range.rs index a819301da3f9b..bbf9568eb6593 100644 --- a/library/core/src/iter/range.rs +++ b/library/core/src/iter/range.rs @@ -293,7 +293,7 @@ macro_rules! step_integer_impls { step_signed_methods!($u_narrower); #[inline] - fn steps_between(start: &Self, end: &Self) -> (usize,Option) { + fn steps_between(start: &Self, end: &Self) -> (usize, Option) { if *start <= *end { // This relies on $i_narrower <= usize // @@ -303,7 +303,7 @@ macro_rules! step_integer_impls { let steps = (*end as isize).wrapping_sub(*start as isize) as usize; (steps, Some(steps)) } else { - (0,None) + (0, None) } } @@ -359,15 +359,15 @@ macro_rules! step_integer_impls { step_unsigned_methods!(); #[inline] - fn steps_between(start: &Self, end: &Self) -> (usize,Option) { + fn steps_between(start: &Self, end: &Self) -> (usize, Option) { if *start <= *end { if let Ok(steps) = usize::try_from(*end - *start) { - (steps,Some(steps)) + (steps, Some(steps)) }else{ - (usize::MAX,None) + (usize::MAX, None) } } else { - (0,None) + (0, None) } } @@ -389,12 +389,12 @@ macro_rules! step_integer_impls { step_signed_methods!($u_wider); #[inline] - fn steps_between(start: &Self, end: &Self) -> (usize,Option) { + fn steps_between(start: &Self, end: &Self) -> (usize, Option) { if *start <= *end { match end.checked_sub(*start) { Some(result) => { if let Ok(steps) = usize::try_from(result) { - (steps,Some(steps)) + (steps, Some(steps)) }else{ (usize::MAX, None) } @@ -404,7 +404,7 @@ macro_rules! step_integer_impls { None => (usize::MAX, None), } } else { - (0,None) + (0, None) } }