Skip to content

Commit 09b4ad8

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 165871 b: refs/heads/try c: f2ef2cd h: refs/heads/master i: 165869: 24f8adc 165867: 6bc94ca 165863: ce91123 165855: 6af3ee0 v: v3
1 parent a08a4b4 commit 09b4ad8

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
@@ -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: fd4a5d9ef12a87cad61f2fa5dd0a011df263a2d0
5+
refs/heads/try: f2ef2cda526ba601cf5091f65cb12962a0ae0956
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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/try/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/try/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)