|
1 |
| -#[crate_id = "msgpack#0.1"]; |
2 |
| -#[comment = "msgpack.org implementation for Rust"]; |
3 |
| -#[license = "MIT/ASL2"]; |
4 |
| -#[crate_type = "lib"]; |
5 |
| -#[feature(struct_variant)]; |
6 |
| -#[allow(unused_must_use, dead_code)]; |
| 1 | +#![crate_id = "msgpack#0.1"] |
| 2 | +#![comment = "msgpack.org implementation for Rust"] |
| 3 | +#![license = "MIT/ASL2"] |
| 4 | +#![crate_type = "lib"] |
| 5 | +#![feature(struct_variant)] |
| 6 | +#![allow(unused_must_use, dead_code)] |
7 | 7 |
|
8 | 8 | extern crate serialize = "serialize#0.10-pre";
|
9 | 9 |
|
@@ -43,8 +43,8 @@ fn read_double(rd: &mut io::Reader) -> f64 {
|
43 | 43 |
|
44 | 44 | /// A structure to decode Msgpack from a reader.
|
45 | 45 | pub struct Decoder<'a> {
|
46 |
| - priv rd: &'a mut io::Reader, |
47 |
| - priv next_byte: Option<u8> |
| 46 | + rd: &'a mut io::Reader, |
| 47 | + next_byte: Option<u8> |
48 | 48 | }
|
49 | 49 |
|
50 | 50 | impl<'a> Decoder<'a> {
|
@@ -141,11 +141,11 @@ impl<'a> Decoder<'a> {
|
141 | 141 | }
|
142 | 142 |
|
143 | 143 | fn decode_array(&mut self, len: uint) -> Value {
|
144 |
| - Array(vec::from_fn(len, |_| { self.decode_value() })) |
| 144 | + Array(Vec::from_fn(len, |_| { self.decode_value() })) |
145 | 145 | }
|
146 | 146 |
|
147 | 147 | fn decode_map(&mut self, len: uint) -> Value {
|
148 |
| - Map(vec::from_fn(len, |_| { (self.decode_value(), self.decode_value()) })) |
| 148 | + Map(Vec::from_fn(len, |_| { (self.decode_value(), self.decode_value()) })) |
149 | 149 | }
|
150 | 150 |
|
151 | 151 | fn decode_ext(&mut self, len: uint) -> Value {
|
@@ -407,7 +407,7 @@ impl<'a> serialize::Decodable<Decoder<'a>> for Value {
|
407 | 407 |
|
408 | 408 | /// A structure for implementing serialization to Msgpack.
|
409 | 409 | pub struct Encoder<'a> {
|
410 |
| - priv wr: &'a mut io::Writer |
| 410 | + wr: &'a mut io::Writer |
411 | 411 | }
|
412 | 412 |
|
413 | 413 | impl<'a> Encoder<'a> {
|
|
0 commit comments