fmt: derive Eq for all types

This commit is contained in:
Andrew Paseltiner 2013-01-07 17:05:13 -05:00
parent 0429493363
commit 73649f36e8

View File

@ -102,10 +102,13 @@ pub mod ct {
use str; use str;
use vec; use vec;
#[deriving_eq]
pub enum Signedness { Signed, Unsigned, } pub enum Signedness { Signed, Unsigned, }
#[deriving_eq]
pub enum Caseness { CaseUpper, CaseLower, } pub enum Caseness { CaseUpper, CaseLower, }
#[deriving_eq]
pub enum Ty { pub enum Ty {
TyBool, TyBool,
TyStr, TyStr,
@ -118,6 +121,7 @@ pub enum Ty {
TyPoly, TyPoly,
} }
#[deriving_eq]
pub enum Flag { pub enum Flag {
FlagLeftJustify, FlagLeftJustify,
FlagLeftZeroPad, FlagLeftZeroPad,
@ -126,6 +130,7 @@ pub enum Flag {
FlagAlternate, FlagAlternate,
} }
#[deriving_eq]
pub enum Count { pub enum Count {
CountIs(uint), CountIs(uint),
CountIsParam(uint), CountIsParam(uint),
@ -133,6 +138,7 @@ pub enum Count {
CountImplied, CountImplied,
} }
#[deriving_eq]
struct Parsed<T> { struct Parsed<T> {
val: T, val: T,
next: uint next: uint
@ -145,6 +151,7 @@ impl<T> Parsed<T> {
} }
// A formatted conversion from an expression to a string // A formatted conversion from an expression to a string
#[deriving_eq]
pub struct Conv { pub struct Conv {
param: Option<uint>, param: Option<uint>,
flags: ~[Flag], flags: ~[Flag],
@ -154,6 +161,7 @@ pub struct Conv {
} }
// A fragment of the output sequence // A fragment of the output sequence
#[deriving_eq]
pub enum Piece { PieceString(~str), PieceConv(Conv), } pub enum Piece { PieceString(~str), PieceConv(Conv), }
pub type ErrorFn = @fn(&str) -> !; pub type ErrorFn = @fn(&str) -> !;