diff options
| author | Jorge Aparicio <japaricious@gmail.com> | 2014-12-14 23:24:36 -0500 |
|---|---|---|
| committer | Jorge Aparicio <japaricious@gmail.com> | 2014-12-19 10:51:00 -0500 |
| commit | a77e8a63d5d4c0fa04a878995824e727870135f9 (patch) | |
| tree | c422bcbfb5fe130035b38f2c7eb56e632845ca9a /src/libstd/num | |
| parent | 2df30a47e2e0ef563d9ed80cb3cc258cbea0f53a (diff) | |
| download | rust-a77e8a63d5d4c0fa04a878995824e727870135f9.tar.gz rust-a77e8a63d5d4c0fa04a878995824e727870135f9.zip | |
libstd: use `#[deriving(Copy)]`
Diffstat (limited to 'src/libstd/num')
| -rw-r--r-- | src/libstd/num/strconv.rs | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index 2b319640d1b..016c4bd532a 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -17,7 +17,6 @@ pub use self::SignificantDigits::*; pub use self::SignFormat::*; use char::{mod, Char}; -use kinds::Copy; use num::{mod, Int, Float, FPNaN, FPInfinite, ToPrimitive}; use ops::FnMut; use slice::{SliceExt, CloneSliceExt}; @@ -26,6 +25,7 @@ use string::String; use vec::Vec; /// A flag that specifies whether to use exponential (scientific) notation. +#[deriving(Copy)] pub enum ExponentFormat { /// Do not use exponential notation. ExpNone, @@ -38,10 +38,9 @@ pub enum ExponentFormat { ExpBin, } -impl Copy for ExponentFormat {} - /// The number of digits used for emitting the fractional part of a number, if /// any. +#[deriving(Copy)] pub enum SignificantDigits { /// All calculable digits will be printed. /// @@ -57,9 +56,8 @@ pub enum SignificantDigits { DigExact(uint) } -impl Copy for SignificantDigits {} - /// How to emit the sign of a number. +#[deriving(Copy)] pub enum SignFormat { /// No sign will be printed. The exponent sign will also be emitted. SignNone, @@ -71,8 +69,6 @@ pub enum SignFormat { SignAll, } -impl Copy for SignFormat {} - /// Converts an integral number to its string representation as a byte vector. /// This is meant to be a common base implementation for all integral string /// conversion functions like `to_string()` or `to_str_radix()`. |
