File tree Expand file tree Collapse file tree 4 files changed +5
-10
lines changed
branches/auto/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 @@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
10
10
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
11
11
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
12
12
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13
- refs/heads/auto: fd4a5d9ef12a87cad61f2fa5dd0a011df263a2d0
13
+ refs/heads/auto: f2ef2cda526ba601cf5091f65cb12962a0ae0956
14
14
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
15
15
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
16
16
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
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