Skip to content

Commit

Permalink
Rollup merge of rust-lang#49102 - glandium:decimal, r=aturon
Browse files Browse the repository at this point in the history
Remove core::fmt::num::Decimal

Before ebf9e1a, it was used for Display::fmt, but ebf9e1a replaced
that with a faster implementation, and nothing else uses it.
  • Loading branch information
frewsxcv authored Mar 23, 2018
2 parents db65b0c + 9e62681 commit a662d20
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/libcore/fmt/num.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,6 @@ struct Binary;
#[derive(Clone, PartialEq)]
struct Octal;

/// A decimal (base 10) radix
#[derive(Clone, PartialEq)]
struct Decimal;

/// A hexadecimal (base 16) radix, formatted with lower-case characters
#[derive(Clone, PartialEq)]
struct LowerHex;
Expand All @@ -134,7 +130,6 @@ macro_rules! radix {

radix! { Binary, 2, "0b", x @ 0 ... 1 => b'0' + x }
radix! { Octal, 8, "0o", x @ 0 ... 7 => b'0' + x }
radix! { Decimal, 10, "", x @ 0 ... 9 => b'0' + x }
radix! { LowerHex, 16, "0x", x @ 0 ... 9 => b'0' + x,
x @ 10 ... 15 => b'a' + (x - 10) }
radix! { UpperHex, 16, "0x", x @ 0 ... 9 => b'0' + x,
Expand Down

0 comments on commit a662d20

Please sign in to comment.