Skip to content

Commit

Permalink
Automated fixes to follow Rust development
Browse files Browse the repository at this point in the history
Applied fixes:
	*attribute fix (cf rust-lang/rust#2569)
	*New vec library (cf rust-lang/rust#12771)
	*priv attribute removal (cf rust-lang/rust@f2a5c7a)
  • Loading branch information
Geal committed Apr 2, 2014
1 parent 733a5f3 commit 919d074
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/examples/value/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[feature(phase)];
#![feature(phase)]

#[phase(syntax, link)] extern crate log;
extern crate msgpack = "msgpack#0.1";
Expand Down
22 changes: 11 additions & 11 deletions src/msgpack/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#[crate_id = "msgpack#0.1"];
#[comment = "msgpack.org implementation for Rust"];
#[license = "MIT/ASL2"];
#[crate_type = "lib"];
#[feature(struct_variant)];
#[allow(unused_must_use, dead_code)];
#![crate_id = "msgpack#0.1"]
#![comment = "msgpack.org implementation for Rust"]
#![license = "MIT/ASL2"]
#![crate_type = "lib"]
#![feature(struct_variant)]
#![allow(unused_must_use, dead_code)]

extern crate serialize = "serialize#0.10-pre";

Expand Down Expand Up @@ -43,8 +43,8 @@ fn read_double(rd: &mut io::Reader) -> f64 {

/// A structure to decode Msgpack from a reader.
pub struct Decoder<'a> {
priv rd: &'a mut io::Reader,
priv next_byte: Option<u8>
rd: &'a mut io::Reader,
next_byte: Option<u8>
}

impl<'a> Decoder<'a> {
Expand Down Expand Up @@ -141,11 +141,11 @@ impl<'a> Decoder<'a> {
}

fn decode_array(&mut self, len: uint) -> Value {
Array(vec::from_fn(len, |_| { self.decode_value() }))
Array(Vec::from_fn(len, |_| { self.decode_value() }))
}

fn decode_map(&mut self, len: uint) -> Value {
Map(vec::from_fn(len, |_| { (self.decode_value(), self.decode_value()) }))
Map(Vec::from_fn(len, |_| { (self.decode_value(), self.decode_value()) }))
}

fn decode_ext(&mut self, len: uint) -> Value {
Expand Down Expand Up @@ -407,7 +407,7 @@ impl<'a> serialize::Decodable<Decoder<'a>> for Value {

/// A structure for implementing serialization to Msgpack.
pub struct Encoder<'a> {
priv wr: &'a mut io::Writer
wr: &'a mut io::Writer
}

impl<'a> Encoder<'a> {
Expand Down

0 comments on commit 919d074

Please sign in to comment.