From a42752af2fd60c8e50464957738de06b2b402fa3 Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Sun, 24 Apr 2016 15:40:05 +0100 Subject: [PATCH] Update dependencies. --- .gitignore | 1 - Cargo.lock | 68 +++++++++++------------------------------------ Cargo.toml | 14 +++++----- src/audio_file.rs | 4 +-- src/connection.rs | 11 +------- 5 files changed, 25 insertions(+), 73 deletions(-) diff --git a/.gitignore b/.gitignore index ccf25287..50242a6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ target -Cargo.lock .cargo spotify_appkey.key .vagrant/ diff --git a/Cargo.lock b/Cargo.lock index e617442c..552f21d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,16 @@ name = "librespot" version = "0.1.0" dependencies = [ - "bit-set 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", - "byteorder 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", + "bit-set 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", + "byteorder 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)", "clippy 0.0.63 (registry+https://github.com/rust-lang/crates.io-index)", "dns-sd 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "eventual 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "getopts 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)", - "hyper 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", + "hyper 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", "json_macros 0.3.0 (git+https://github.com/plietar/json_macros)", - "lazy_static 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)", + "lazy_static 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "libpulse-sys 0.0.0 (git+https://github.com/astro/libpulse-sys)", "librespot-protocol 0.1.0", "lmdb-rs 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -22,15 +22,15 @@ dependencies = [ "protobuf 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf_macros 0.4.0 (git+https://github.com/plietar/rust-protobuf-macros)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", - "rpassword 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "rpassword 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.35 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", "shannon 0.1.1 (git+https://github.com/plietar/rust-shannon)", "syntex 0.31.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tempfile 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)", + "tempfile 2.1.3 (registry+https://github.com/rust-lang/crates.io-index)", "time 0.1.35 (registry+https://github.com/rust-lang/crates.io-index)", "tremor 0.1.0 (git+https://github.com/plietar/rust-tremor)", - "url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "vergen 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "vorbis 0.0.14 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -53,7 +53,7 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bit-vec 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)", @@ -84,11 +84,6 @@ name = "blastfig" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "byteorder" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "byteorder" version = "0.5.1" @@ -178,14 +173,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "hyper" -version = "0.7.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "cookie 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "httparse 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", + "mime 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "num_cpus 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)", "openssl 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)", "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", @@ -194,7 +189,7 @@ dependencies = [ "traitobject 0.0.1 (registry+https://github.com/rust-lang/crates.io-index)", "typeable 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", - "url 0.5.9 (registry+https://github.com/rust-lang/crates.io-index)", + "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -233,11 +228,6 @@ name = "language-tags" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "lazy_static" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" - [[package]] name = "lazy_static" version = "0.2.0" @@ -317,11 +307,10 @@ dependencies = [ [[package]] name = "mime" -version = "0.1.3" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "serde 0.6.15 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -556,7 +545,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "rpassword" -version = "0.1.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -603,14 +592,6 @@ dependencies = [ "nom 1.2.2 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "serde" -version = "0.6.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "shannon" version = "0.1.1" @@ -679,12 +660,13 @@ dependencies = [ [[package]] name = "tempfile" -version = "2.0.1" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", + "rustc_version 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -795,18 +777,6 @@ name = "unicode-xid" version = "0.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "url" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "matches 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-bidi 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", - "unicode-normalization 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "url" version = "1.0.0" @@ -830,14 +800,6 @@ name = "utf8-ranges" version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -[[package]] -name = "uuid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "vergen" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 0c167706..29d26d27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,23 +16,23 @@ path = "src/main.rs" path = "protocol" [dependencies] -bit-set = "~0.2.0" -byteorder = "~0.4.2" +bit-set = "~0.4.0" +byteorder = "~0.5.1" eventual = "~0.1.6" getopts = "~0.2.14" -hyper = { version = "0.7.2", default-features = false } +hyper = { version = "0.9.1", default-features = false } #json_macros = "~0.3.0" -lazy_static = "~0.1.15" +lazy_static = "~0.2.0" lmdb-rs = "0.7.0" num = "~0.1.30" protobuf = "~1.0.15" rand = "~0.3.13" -rpassword = "~0.1.1" +rpassword = "~0.2.2" rust-crypto = "~0.2.34" rustc-serialize = "~0.3.16" -tempfile = "~2.0.0" +tempfile = "~2.1.3" time = "~0.1.34" -url = "~0.5.2" +url = "~1.0.0" log = "0.3.5" env_logger = "0.3.2" shannon = { git = "https://github.com/plietar/rust-shannon" } diff --git a/src/audio_file.rs b/src/audio_file.rs index 4ed00a52..370af1b5 100644 --- a/src/audio_file.rs +++ b/src/audio_file.rs @@ -104,7 +104,7 @@ impl AudioFile { break; } - while bitmap.contains(&index) { + while bitmap.contains(index) { index = (index + 1) % shared.chunk_count; } drop(bitmap); @@ -155,7 +155,7 @@ impl Read for AudioFile { let len = min(output.len(), CHUNK_SIZE - offset); let mut bitmap = self.shared.bitmap.lock().unwrap(); - while !bitmap.contains(&index) { + while !bitmap.contains(index) { bitmap = self.shared.cond.wait(bitmap).unwrap(); } drop(bitmap); diff --git a/src/connection.rs b/src/connection.rs index f01164de..acaa6fd2 100644 --- a/src/connection.rs +++ b/src/connection.rs @@ -1,4 +1,4 @@ -use byteorder::{self, BigEndian, ByteOrder, ReadBytesExt, WriteBytesExt}; +use byteorder::{BigEndian, ByteOrder, ReadBytesExt, WriteBytesExt}; use shannon::ShannonStream; use std::convert; use std::io; @@ -20,15 +20,6 @@ impl convert::From for Error { } } -impl convert::From for Error { - fn from(err: byteorder::Error) -> Error { - match err { - byteorder::Error::Io(e) => Error::IoError(e), - _ => Error::Other, - } - } -} - pub struct PlainConnection { stream: TcpStream, }