Skip to content

Commit 28d929c

Browse files
committed
Use #[derive()] instead of #[deriving()].
1 parent d6e764c commit 28d929c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::ops::Index;
88

99
pub mod nfa;
1010

11-
#[deriving(Clone)]
11+
#[derive(Clone)]
1212
struct Metadata {
1313
statics: int,
1414
dynamics: int,
@@ -56,7 +56,7 @@ impl PartialEq for Metadata {
5656

5757
impl Eq for Metadata {}
5858

59-
#[deriving(PartialEq, Clone, Show)]
59+
#[derive(PartialEq, Clone, Show)]
6060
pub struct Params {
6161
map: BTreeMap<String, String>
6262
}
@@ -95,7 +95,7 @@ impl<T> Match<T> {
9595
}
9696
}
9797

98-
#[deriving(Clone)]
98+
#[derive(Clone)]
9999
pub struct Router<T> {
100100
nfa: NFA<Metadata>,
101101
handlers: BTreeMap<uint, T>

src/nfa.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use self::CharacterClass::{Ascii, ValidChars, InvalidChars};
55
#[cfg(test)] use test;
66
#[cfg(test)] use std::collections::BTreeSet;
77

8-
#[deriving(PartialEq, Eq, Clone)]
8+
#[derive(PartialEq, Eq, Clone)]
99
pub struct CharSet {
1010
low_mask: u64,
1111
high_mask: u64,
@@ -46,7 +46,7 @@ impl CharSet {
4646
}
4747
}
4848

49-
#[deriving(PartialEq, Eq, Clone)]
49+
#[derive(PartialEq, Eq, Clone)]
5050
pub enum CharacterClass {
5151
Ascii(u64, u64, bool),
5252
ValidChars(CharSet),
@@ -123,7 +123,7 @@ impl CharacterClass {
123123
}
124124
}
125125

126-
#[deriving(Clone)]
126+
#[derive(Clone)]
127127
struct Thread {
128128
state: uint,
129129
captures: Vec<(uint, uint)>,
@@ -151,7 +151,7 @@ impl Thread {
151151
}
152152
}
153153

154-
#[deriving(Clone)]
154+
#[derive(Clone)]
155155
pub struct State<T> {
156156
pub index: uint,
157157
pub chars: CharacterClass,
@@ -193,7 +193,7 @@ impl<'a> Match<'a> {
193193
}
194194
}
195195

196-
#[deriving(Clone)]
196+
#[derive(Clone)]
197197
pub struct NFA<T> {
198198
states: Vec<State<T>>,
199199
start_capture: Vec<bool>,

0 commit comments

Comments
 (0)