Skip to content

Commit a08a4b4

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 165870 b: refs/heads/try c: fd4a5d9 h: refs/heads/master v: v3
1 parent 24f8adc commit a08a4b4

File tree

2 files changed

+4
-9
lines changed

2 files changed

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

branches/try/src/librbml/lib.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ use std::str;
4141
pub mod io;
4242

4343
/// Common data structures
44-
#[deriving(Clone)]
44+
#[deriving(Clone, Copy)]
4545
pub struct Doc<'a> {
4646
pub data: &'a [u8],
4747
pub start: uint,
4848
pub end: uint,
4949
}
5050

51-
impl<'doc> Copy for Doc<'doc> {}
52-
5351
impl<'doc> Doc<'doc> {
5452
pub fn new(data: &'doc [u8]) -> Doc<'doc> {
5553
Doc { data: data, start: 0u, end: data.len() }
@@ -73,7 +71,7 @@ pub struct TaggedDoc<'a> {
7371
pub doc: Doc<'a>,
7472
}
7573

76-
#[deriving(Show)]
74+
#[deriving(Copy, Show)]
7775
pub enum EbmlEncoderTag {
7876
EsUint, // 0
7977
EsU64, // 1
@@ -107,8 +105,6 @@ pub enum EbmlEncoderTag {
107105
EsLabel, // Used only when debugging
108106
}
109107

110-
impl Copy for EbmlEncoderTag {}
111-
112108
#[deriving(Show)]
113109
pub enum Error {
114110
IntTooBig(uint),
@@ -151,13 +147,12 @@ pub mod reader {
151147
)
152148
}
153149

150+
#[deriving(Copy)]
154151
pub struct Res {
155152
pub val: uint,
156153
pub next: uint
157154
}
158155

159-
impl Copy for Res {}
160-
161156
#[inline(never)]
162157
fn vuint_at_slow(data: &[u8], start: uint) -> DecodeResult<Res> {
163158
let a = data[start];

0 commit comments

Comments
 (0)