Update dependencies

This commit is contained in:
Cobrand
2018-10-10 00:01:09 +00:00
parent 078d916a31
commit a51ad1aaf8
3 changed files with 19 additions and 15 deletions
+3 -3
View File
@@ -17,9 +17,9 @@ path = "src/sdl2/lib.rs"
[dependencies]
bitflags = "0.7"
libc = "0.2"
rand = "0.3"
lazy_static="0.2"
libc = "^0.2"
rand = "^0.5"
lazy_static = "^1"
[dependencies.num]
version = "0.1"
+8 -8
View File
@@ -16,35 +16,35 @@ name = "sdl2_sys"
path = "src/lib.rs"
[build-dependencies.bindgen]
version = "0.35"
version = "^0.42"
optional = true
[build-dependencies.pkg-config]
version = "0.3.9"
version = "^0.3"
optional = true
[build-dependencies.cmake]
version = "0.1"
version = "^0.1"
optional = true
[build-dependencies.reqwest]
version = "0.7"
version = "^0.9"
optional = true
[build-dependencies.tar]
version = "0.4"
version = "^0.4"
optional = true
[build-dependencies.flate2]
version = "0.2"
version = "^1"
optional = true
[build-dependencies.unidiff]
version = "0.2.1"
version = "^0.2"
optional = true
[build-dependencies]
cfg-if = "0.1"
cfg-if = "^0.1"
[features]
+8 -4
View File
@@ -43,9 +43,13 @@ fn download_to<T: io::Write>(url: &str, mut dest: T) {
use io::BufRead;
let resp = reqwest::get(url).expect(&format!("Failed to GET resource: {:?}", url));
let size = resp.headers()
.get::<reqwest::header::ContentLength>()
.map(|ct_len| **ct_len)
let size: u32 = resp.headers()
.get(reqwest::header::CONTENT_LENGTH)
.and_then(|cl| {
cl.to_str().ok().and_then(|cl| {
cl.parse::<u32>().ok()
})
})
.unwrap_or(0);
if !resp.status().is_success() { panic!("Download request failed with status: {:?}", resp.status()) }
if size == 0 { panic!("Size of content was returned was 0") }
@@ -107,7 +111,7 @@ fn download_sdl2() -> PathBuf {
let reader = flate2::read::GzDecoder::new(
fs::File::open(&sdl2_archive_path).unwrap()
).unwrap();
);
let mut ar = tar::Archive::new(reader);
ar.unpack(&out_dir).unwrap();