Add `deriving(Copy)` for `Copy`able structs/enums/
This commit is contained in:
parent
01cc022174
commit
d89fbbf044
|
@ -857,7 +857,7 @@ fn get_radix_base(radix: uint) -> (DoubleBigDigit, uint) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A Sign is a `BigInt`'s composing element.
|
/// A Sign is a `BigInt`'s composing element.
|
||||||
#[deriving(PartialEq, PartialOrd, Eq, Ord, Clone, Show, Encodable, Decodable)]
|
#[deriving(PartialEq, PartialOrd, Eq, Ord, Copy, Clone, Show, Encodable, Decodable)]
|
||||||
pub enum Sign { Minus, NoSign, Plus }
|
pub enum Sign { Minus, NoSign, Plus }
|
||||||
|
|
||||||
impl Neg<Sign> for Sign {
|
impl Neg<Sign> for Sign {
|
||||||
|
|
|
@ -21,7 +21,7 @@ use {Zero, One, Num};
|
||||||
// probably doesn't map to C's _Complex correctly.
|
// probably doesn't map to C's _Complex correctly.
|
||||||
|
|
||||||
/// A complex number in Cartesian form.
|
/// A complex number in Cartesian form.
|
||||||
#[deriving(PartialEq, Clone, Hash, Encodable, Decodable)]
|
#[deriving(PartialEq, Copy, Clone, Hash, Encodable, Decodable)]
|
||||||
pub struct Complex<T> {
|
pub struct Complex<T> {
|
||||||
/// Real portion of the complex number
|
/// Real portion of the complex number
|
||||||
pub re: T,
|
pub re: T,
|
||||||
|
|
|
@ -22,7 +22,7 @@ use bigint::{BigInt, BigUint, Sign};
|
||||||
use {Num, Signed, Zero, One};
|
use {Num, Signed, Zero, One};
|
||||||
|
|
||||||
/// Represents the ratio between 2 numbers.
|
/// Represents the ratio between 2 numbers.
|
||||||
#[deriving(Clone, Hash, Encodable, Decodable)]
|
#[deriving(Copy, Clone, Hash, Encodable, Decodable)]
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
pub struct Ratio<T> {
|
pub struct Ratio<T> {
|
||||||
numer: T,
|
numer: T,
|
||||||
|
|
Loading…
Reference in New Issue