Skip to content

Commit 42c61e2

Browse files
committed
Fix indenting and brakets
1 parent 84ec14a commit 42c61e2

File tree

3 files changed

+29
-28
lines changed

3 files changed

+29
-28
lines changed

library/core/src/fmt/float.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ where
196196
}
197197

198198
macro_rules! floating {
199-
($($ty:ident)*) => (
199+
($($ty:ident)*) => {
200200
$(
201201
#[stable(feature = "rust1", since = "1.0.0")]
202202
impl Debug for $ty {
@@ -226,7 +226,7 @@ macro_rules! floating {
226226
}
227227
}
228228
)*
229-
)
229+
};
230230
}
231231

232232
floating! { f32 f64 }

library/core/src/fmt/nofloat.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::fmt::{Debug, Formatter, Result};
22

33
macro_rules! floating {
4-
($($ty:ident)*) => (
4+
($($ty:ident)*) => {
55
$(
66
#[stable(feature = "rust1", since = "1.0.0")]
77
impl Debug for $ty {
@@ -11,7 +11,7 @@ macro_rules! floating {
1111
}
1212
}
1313
)*
14-
)
14+
};
1515
}
1616

1717
floating! { f16 f32 f64 f128 }

library/core/src/fmt/num.rs

+25-24
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ trait DisplayInt:
2020

2121
macro_rules! impl_int {
2222
($($t:ident)*) => (
23-
$(impl DisplayInt for $t {
24-
fn zero() -> Self { 0 }
25-
fn from_u8(u: u8) -> Self { u as Self }
26-
fn to_u8(&self) -> u8 { *self as u8 }
27-
#[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))]
28-
fn to_u32(&self) -> u32 { *self as u32 }
29-
fn to_u64(&self) -> u64 { *self as u64 }
30-
fn to_u128(&self) -> u128 { *self as u128 }
31-
})*
23+
$(impl DisplayInt for $t {
24+
fn zero() -> Self { 0 }
25+
fn from_u8(u: u8) -> Self { u as Self }
26+
fn to_u8(&self) -> u8 { *self as u8 }
27+
#[cfg(not(any(target_pointer_width = "64", target_arch = "wasm32")))]
28+
fn to_u32(&self) -> u32 { *self as u32 }
29+
fn to_u64(&self) -> u64 { *self as u64 }
30+
fn to_u128(&self) -> u128 { *self as u128 }
31+
})*
3232
)
3333
}
3434

@@ -169,22 +169,23 @@ integer! { i64, u64 }
169169
integer! { i128, u128 }
170170

171171
macro_rules! impl_Debug {
172-
($($T:ident)*) => (
172+
($($T:ident)*) => {
173173
$(
174-
#[stable(feature = "rust1", since = "1.0.0")]
175-
impl fmt::Debug for $T {
176-
#[inline]
177-
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
178-
if f.debug_lower_hex() {
179-
fmt::LowerHex::fmt(self, f)
180-
} else if f.debug_upper_hex() {
181-
fmt::UpperHex::fmt(self, f)
182-
} else {
183-
fmt::Display::fmt(self, f)
174+
#[stable(feature = "rust1", since = "1.0.0")]
175+
impl fmt::Debug for $T {
176+
#[inline]
177+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
178+
if f.debug_lower_hex() {
179+
fmt::LowerHex::fmt(self, f)
180+
} else if f.debug_upper_hex() {
181+
fmt::UpperHex::fmt(self, f)
182+
} else {
183+
fmt::Display::fmt(self, f)
184+
}
184185
}
185186
}
186-
})*
187-
)
187+
)*
188+
};
188189
}
189190

190191
// 2 digit decimal look up table
@@ -509,8 +510,8 @@ macro_rules! impl_Exp {
509510
}
510511

511512
impl_Debug! {
512-
i8 i16 i32 i64 i128 isize
513-
u8 u16 u32 u64 u128 usize
513+
i8 i16 i32 i64 i128 isize
514+
u8 u16 u32 u64 u128 usize
514515
}
515516

516517
// Include wasm32 in here since it doesn't reflect the native pointer size, and

0 commit comments

Comments
 (0)