Skip to content

Commit 99d27e9

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 164639 b: refs/heads/auto c: f2ef2cd h: refs/heads/master i: 164637: 3e9760e 164635: 450cec3 164631: 79a5714 164623: 1c7f75d 164607: 224fe03 v: v3
1 parent 784ce99 commit 99d27e9

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1010
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1111
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1212
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
13-
refs/heads/auto: fd4a5d9ef12a87cad61f2fa5dd0a011df263a2d0
13+
refs/heads/auto: f2ef2cda526ba601cf5091f65cb12962a0ae0956
1414
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1515
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1616
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/libregex/parse.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,12 @@ pub enum Repeater {
7777
OneMore,
7878
}
7979

80-
#[deriving(Show, Clone)]
80+
#[deriving(Copy, Show, Clone)]
8181
pub enum Greed {
8282
Greedy,
8383
Ungreedy,
8484
}
8585

86-
impl Copy for Greed {}
87-
8886
impl Greed {
8987
pub fn is_greedy(&self) -> bool {
9088
match *self {

branches/auto/src/libregex/re.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ pub struct ExDynamic {
126126
}
127127

128128
#[doc(hidden)]
129+
#[deriving(Copy)]
129130
pub struct ExNative {
130131
#[doc(hidden)]
131132
pub original: &'static str,
@@ -135,8 +136,6 @@ pub struct ExNative {
135136
pub prog: fn(MatchKind, &str, uint, uint) -> Vec<Option<uint>>
136137
}
137138

138-
impl Copy for ExNative {}
139-
140139
impl Clone for ExNative {
141140
fn clone(&self) -> ExNative {
142141
*self

branches/auto/src/libregex/vm.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ use unicode::regex::PERLW;
5050
pub type CaptureLocs = Vec<Option<uint>>;
5151

5252
/// Indicates the type of match to be performed by the VM.
53+
#[deriving(Copy)]
5354
pub enum MatchKind {
5455
/// Only checks if a match exists or not. Does not return location.
5556
Exists,
@@ -60,8 +61,6 @@ pub enum MatchKind {
6061
Submatches,
6162
}
6263

63-
impl Copy for MatchKind {}
64-
6564
/// Runs an NFA simulation on the compiled expression given on the search text
6665
/// `input`. The search begins at byte index `start` and ends at byte index
6766
/// `end`. (The range is specified here so that zero-width assertions will work
@@ -96,6 +95,7 @@ struct Nfa<'r, 't> {
9695

9796
/// Indicates the next action to take after a single non-empty instruction
9897
/// is processed.
98+
#[deriving(Copy)]
9999
pub enum StepState {
100100
/// This is returned if and only if a Match instruction is reached and
101101
/// we only care about the existence of a match. It instructs the VM to
@@ -109,8 +109,6 @@ pub enum StepState {
109109
StepContinue,
110110
}
111111

112-
impl Copy for StepState {}
113-
114112
impl<'r, 't> Nfa<'r, 't> {
115113
fn run(&mut self) -> CaptureLocs {
116114
let ncaps = match self.which {

0 commit comments

Comments
 (0)