File tree Expand file tree Collapse file tree 4 files changed +5
-10
lines changed
branches/try/src/libregex Expand file tree Collapse file tree 4 files changed +5
-10
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 18842f89f084c52588fe7cffe07f87bf6e90796a
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 658529467d9d69ac9e09cacf98a6d61d781c2c76
5
- refs/heads/try: fd4a5d9ef12a87cad61f2fa5dd0a011df263a2d0
5
+ refs/heads/try: f2ef2cda526ba601cf5091f65cb12962a0ae0956
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
8
8
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
Original file line number Diff line number Diff line change @@ -77,14 +77,12 @@ pub enum Repeater {
77
77
OneMore ,
78
78
}
79
79
80
- #[ deriving( Show , Clone ) ]
80
+ #[ deriving( Copy , Show , Clone ) ]
81
81
pub enum Greed {
82
82
Greedy ,
83
83
Ungreedy ,
84
84
}
85
85
86
- impl Copy for Greed { }
87
-
88
86
impl Greed {
89
87
pub fn is_greedy ( & self ) -> bool {
90
88
match * self {
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ pub struct ExDynamic {
126
126
}
127
127
128
128
#[ doc( hidden) ]
129
+ #[ deriving( Copy ) ]
129
130
pub struct ExNative {
130
131
#[ doc( hidden) ]
131
132
pub original : & ' static str ,
@@ -135,8 +136,6 @@ pub struct ExNative {
135
136
pub prog : fn ( MatchKind , & str , uint , uint ) -> Vec < Option < uint > >
136
137
}
137
138
138
- impl Copy for ExNative { }
139
-
140
139
impl Clone for ExNative {
141
140
fn clone ( & self ) -> ExNative {
142
141
* self
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ use unicode::regex::PERLW;
50
50
pub type CaptureLocs = Vec < Option < uint > > ;
51
51
52
52
/// Indicates the type of match to be performed by the VM.
53
+ #[ deriving( Copy ) ]
53
54
pub enum MatchKind {
54
55
/// Only checks if a match exists or not. Does not return location.
55
56
Exists ,
@@ -60,8 +61,6 @@ pub enum MatchKind {
60
61
Submatches ,
61
62
}
62
63
63
- impl Copy for MatchKind { }
64
-
65
64
/// Runs an NFA simulation on the compiled expression given on the search text
66
65
/// `input`. The search begins at byte index `start` and ends at byte index
67
66
/// `end`. (The range is specified here so that zero-width assertions will work
@@ -96,6 +95,7 @@ struct Nfa<'r, 't> {
96
95
97
96
/// Indicates the next action to take after a single non-empty instruction
98
97
/// is processed.
98
+ #[ deriving( Copy ) ]
99
99
pub enum StepState {
100
100
/// This is returned if and only if a Match instruction is reached and
101
101
/// we only care about the existence of a match. It instructs the VM to
@@ -109,8 +109,6 @@ pub enum StepState {
109
109
StepContinue ,
110
110
}
111
111
112
- impl Copy for StepState { }
113
-
114
112
impl < ' r , ' t > Nfa < ' r , ' t > {
115
113
fn run ( & mut self ) -> CaptureLocs {
116
114
let ncaps = match self . which {
You can’t perform that action at this time.
0 commit comments