Skip to content

Commit

Permalink
Update to rust master
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcrichton committed Feb 5, 2015
1 parent 64361b7 commit 4033d52
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ libc = "0.1"
[dependencies.miniz-sys]
path = "miniz-sys"
version = "0.1.0"

[dev-dependencies]
rand = "0.1"
7 changes: 5 additions & 2 deletions miniz-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "miniz-sys"
version = "0.1.0"
version = "0.1.1"
authors = ["Alex Crichton <[email protected]>"]
links = "miniz"
build = "build.rs"
Expand All @@ -15,5 +15,8 @@ Bindings to the miniz.c library.
name = "miniz-sys"
path = "lib.rs"

[dependencies]
libc = "0.1"

[build-dependencies]
gcc = "0.1.0"
gcc = "0.1"
2 changes: 1 addition & 1 deletion src/deflate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl<W: Writer> Writer for DecoderWriter<W> {
mod tests {
use super::{EncoderWriter, EncoderReader, DecoderReader, DecoderWriter};
use std::old_io::{MemWriter, MemReader, BufReader};
use std::rand::{thread_rng, Rng};
use rand::{thread_rng, Rng};

use CompressionLevel::Default;

Expand Down
8 changes: 4 additions & 4 deletions src/gz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ use std::ffi::CString;
use std::old_io::{BytesReader,IoResult, IoError};
use std::old_io;
use std::iter::repeat;
use std::os;
use std::path::BytesContainer;
use std::env;
use std::old_path::BytesContainer;
use std::slice::bytes;

use {BestCompression, CompressionLevel, BestSpeed};
Expand Down Expand Up @@ -177,7 +177,7 @@ impl Builder {
BestSpeed => 4,
_ => 0,
};
header[9] = match os::consts::SYSNAME {
header[9] = match env::consts::OS {
"linux" => 3,
"macos" => 7,
"win32" => 0,
Expand Down Expand Up @@ -465,7 +465,7 @@ mod tests {
use super::{EncoderWriter, EncoderReader, DecoderReader, Builder};
use CompressionLevel::Default;
use std::old_io::{MemWriter, MemReader};
use std::rand::{thread_rng, Rng};
use rand::{thread_rng, Rng};

#[test]
fn roundtrip() {
Expand Down
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
//! These provide convenience methods for creating a decoder/encoder out of an
//! already existing stream to chain construction.

#![feature(io, core, collections, std_misc, path, env)]
#![deny(missing_docs)]
#![feature(unsafe_destructor)]
#![cfg_attr(test, allow(unstable))]
#![cfg_attr(test, deny(warnings))]

extern crate libc;
extern crate "miniz-sys" as ffi;
#[cfg(test)] extern crate rand;

use std::old_io::IoResult;

Expand Down
2 changes: 1 addition & 1 deletion src/zlib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl<W: Writer> Writer for DecoderWriter<W> {
mod tests {
use super::{EncoderWriter, EncoderReader, DecoderReader, DecoderWriter};
use std::old_io::{MemWriter, MemReader, BufReader};
use std::rand::{thread_rng, Rng};
use rand::{thread_rng, Rng};

use CompressionLevel::Default;

Expand Down
2 changes: 2 additions & 0 deletions tests/gunzip.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(io, path)]

extern crate flate2;

use std::old_io::{IoErrorKind, IoResult, File};
Expand Down

0 comments on commit 4033d52

Please sign in to comment.