Skip to content

Commit 7087ec0

Browse files
committed
Automated fixes to follow Rust development
Applied fixes: *attribute fix (cf rust-lang/rust#2569) *crate extra was removed *priv attribute removal (cf rust-lang/rust@f2a5c7a) *update the channel constructor (cf rust-lang/rust@7858065)
1 parent 6a37763 commit 7087ec0

File tree

8 files changed

+21
-21
lines changed

8 files changed

+21
-21
lines changed

src/example/main.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#[crate_id = "redis-example#0.1"];
2-
#[crate_type = "bin"];
1+
#![crate_id = "redis-example#0.1"]
2+
#![crate_type = "bin"]
33

44
extern crate redis;
55

src/redis/client.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ use connection::Connection;
1111
mod macros;
1212

1313
pub struct Client {
14-
priv addr: SocketAddr,
15-
priv db: i64,
14+
addr: SocketAddr,
15+
db: i64,
1616
}
1717

1818
impl Client {

src/redis/connection.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ fn value_to_byte_float_tuples(val: Value) -> ~[(~[u8], f32)] {
117117
}
118118

119119
pub struct Connection {
120-
priv addr: SocketAddr,
121-
priv sock: TcpStream,
122-
priv db: i64,
120+
addr: SocketAddr,
121+
sock: TcpStream,
122+
db: i64,
123123
}
124124

125125
impl Connection {

src/redis/lib.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
#[crate_id = "redis#0.1"];
2-
#[crate_type = "lib"];
3-
#[license = "BSD"];
4-
#[comment = "Bindings and wrapper functions for redis."];
1+
#![crate_id = "redis#0.1"]
2+
#![crate_type = "lib"]
3+
#![license = "BSD"]
4+
#![comment = "Bindings and wrapper functions for redis."]
5+
6+
#![deny(non_camel_case_types)]
7+
#![feature(macro_rules)]
8+
#![feature(globs)]
59

6-
#[deny(non_camel_case_types)];
7-
#[feature(macro_rules)];
8-
#[feature(globs)];
910

10-
extern crate extra;
11-
extern crate time;
12-
extern crate collections;
1311
extern crate serialize;
12+
extern crate collections;
13+
extern crate time;
1414

1515
pub use parser::parse_redis_value;
1616
pub use parser::Parser;

src/redis/macros.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#[macro_escape];
1+
#![macro_escape]
22

33
macro_rules! ensure {
44
($expr:expr, $err_result:expr) => (

src/redis/parser.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ mod macros;
88

99

1010
pub struct Parser<T> {
11-
priv iter: T,
11+
iter: T,
1212
}
1313

1414
pub struct ByteIterator<'a> {

src/redis/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ fn test_script() {
131131
fn test_blpop() {
132132
let ctx = TestContext::new();
133133
let client = ctx.client;
134-
let (port, chan) = Chan::new();
134+
let (port, chan) = comm::channel();
135135
136136
spawn(proc() {
137137
let mut con = client.get_connection().unwrap();

src/redis/utils.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub type EVP_MD_CTX = *libc::c_void;
2222
pub type EVP_MD = *libc::c_void;
2323

2424
pub struct Sha1 {
25-
priv ctx: EVP_MD_CTX,
25+
ctx: EVP_MD_CTX,
2626
}
2727

2828
impl Sha1 {

0 commit comments

Comments
 (0)