Skip to content

Commit a219afa

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 165883 b: refs/heads/try c: 64234b3 h: refs/heads/master i: 165881: aedfffb 165879: 40da85e v: v3
1 parent 13fd1bc commit a219afa

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 18842f89f084c52588fe7cffe07f87bf6e90796a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
5-
refs/heads/try: 86f8c127dd806940fe201b510b9284750fb17271
5+
refs/heads/try: 64234b3541e032302206056e075d500eacec5f35
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/libterm/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ pub mod color {
165165
/// Terminal attributes
166166
pub mod attr {
167167
pub use self::Attr::*;
168-
use std::kinds::Copy;
169168

170169
/// Terminal attributes for use with term.attr().
171170
///
172171
/// Most attributes can only be turned on and must be turned off with term.reset().
173172
/// The ones that can be turned off explicitly take a boolean value.
174173
/// Color is also represented as an attribute for convenience.
174+
#[deriving(Copy)]
175175
pub enum Attr {
176176
/// Bold (or possibly bright) mode
177177
Bold,
@@ -194,8 +194,6 @@ pub mod attr {
194194
/// Convenience attribute to set the background color
195195
BackgroundColor(super::color::Color)
196196
}
197-
198-
impl Copy for Attr {}
199197
}
200198

201199
/// A terminal with similar capabilities to an ANSI Terminal

branches/try/src/libterm/terminfo/parm.rs

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ use self::FormatState::*;
1616
use self::FormatOp::*;
1717
use std::mem::replace;
1818

19-
#[deriving(PartialEq)]
19+
#[deriving(Copy, PartialEq)]
2020
enum States {
2121
Nothing,
2222
Percent,
@@ -33,17 +33,13 @@ enum States {
3333
SeekIfEndPercent(int)
3434
}
3535

36-
impl Copy for States {}
37-
38-
#[deriving(PartialEq)]
36+
#[deriving(Copy, PartialEq)]
3937
enum FormatState {
4038
FormatStateFlags,
4139
FormatStateWidth,
4240
FormatStatePrecision
4341
}
4442

45-
impl Copy for FormatState {}
46-
4743
/// Types of parameters a capability can use
4844
#[allow(missing_docs)]
4945
#[deriving(Clone)]
@@ -446,7 +442,7 @@ pub fn expand(cap: &[u8], params: &[Param], vars: &mut Variables)
446442
Ok(output)
447443
}
448444

449-
#[deriving(PartialEq)]
445+
#[deriving(Copy, PartialEq)]
450446
struct Flags {
451447
width: uint,
452448
precision: uint,
@@ -456,15 +452,14 @@ struct Flags {
456452
space: bool
457453
}
458454

459-
impl Copy for Flags {}
460-
461455
impl Flags {
462456
fn new() -> Flags {
463457
Flags{ width: 0, precision: 0, alternate: false,
464458
left: false, sign: false, space: false }
465459
}
466460
}
467461

462+
#[deriving(Copy)]
468463
enum FormatOp {
469464
FormatDigit,
470465
FormatOctal,
@@ -473,8 +468,6 @@ enum FormatOp {
473468
FormatString
474469
}
475470

476-
impl Copy for FormatOp {}
477-
478471
impl FormatOp {
479472
fn from_char(c: char) -> FormatOp {
480473
match c {

0 commit comments

Comments
 (0)