Skip to content

Commit ea73edb

Browse files
committed
revert spurious edits.
1 parent c8e23d8 commit ea73edb

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

src/liballoc/collections/linked_list.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ impl<T> LinkedList<T> {
402402
#[inline]
403403
#[stable(feature = "rust1", since = "1.0.0")]
404404
pub fn is_empty(&self) -> bool {
405-
self.len() == 0
405+
self.head.is_none()
406406
}
407407

408408
/// Returns the length of the `LinkedList`.

src/libcore/fmt/mod.rs

+5-15
Original file line numberDiff line numberDiff line change
@@ -1617,9 +1617,7 @@ impl<'a> Formatter<'a> {
16171617
/// assert_eq!(&format!("{}", Foo(23)), "Foo(23)");
16181618
/// ```
16191619
#[stable(feature = "fmt_flags", since = "1.5.0")]
1620-
pub fn sign_plus(&self) -> bool {
1621-
self.flags & (1 << FlagV1::SignPlus as u32) != 0
1622-
}
1620+
pub fn sign_plus(&self) -> bool { self.flags & (1 << FlagV1::SignPlus as u32) != 0 }
16231621

16241622
/// Determines if the `-` flag was specified.
16251623
///
@@ -1645,9 +1643,7 @@ impl<'a> Formatter<'a> {
16451643
/// assert_eq!(&format!("{}", Foo(23)), "Foo(23)");
16461644
/// ```
16471645
#[stable(feature = "fmt_flags", since = "1.5.0")]
1648-
pub fn sign_minus(&self) -> bool {
1649-
self.flags & (1 << FlagV1::SignMinus as u32) != 0
1650-
}
1646+
pub fn sign_minus(&self) -> bool { self.flags & (1 << FlagV1::SignMinus as u32) != 0 }
16511647

16521648
/// Determines if the `#` flag was specified.
16531649
///
@@ -1672,9 +1668,7 @@ impl<'a> Formatter<'a> {
16721668
/// assert_eq!(&format!("{}", Foo(23)), "23");
16731669
/// ```
16741670
#[stable(feature = "fmt_flags", since = "1.5.0")]
1675-
pub fn alternate(&self) -> bool {
1676-
self.flags & (1 << FlagV1::Alternate as u32) != 0
1677-
}
1671+
pub fn alternate(&self) -> bool { self.flags & (1 << FlagV1::Alternate as u32) != 0 }
16781672

16791673
/// Determines if the `0` flag was specified.
16801674
///
@@ -1703,13 +1697,9 @@ impl<'a> Formatter<'a> {
17031697

17041698
// FIXME: Decide what public API we want for these two flags.
17051699
// https://github.com/rust-lang/rust/issues/48584
1706-
fn debug_lower_hex(&self) -> bool {
1707-
self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0
1708-
}
1700+
fn debug_lower_hex(&self) -> bool { self.flags & (1 << FlagV1::DebugLowerHex as u32) != 0 }
17091701

1710-
fn debug_upper_hex(&self) -> bool {
1711-
self.flags & (1 << FlagV1::DebugUpperHex as u32) != 0
1712-
}
1702+
fn debug_upper_hex(&self) -> bool { self.flags & (1 << FlagV1::DebugUpperHex as u32) != 0 }
17131703

17141704
/// Creates a [`DebugStruct`] builder designed to assist with creation of
17151705
/// [`fmt::Debug`] implementations for structs.

0 commit comments

Comments
 (0)