Merge pull request #347 from GeorgeHahn/upgrade-dependencies

Upgrade dependencies
This commit is contained in:
Sasha Hilton 2019-07-21 02:16:02 +01:00 committed by GitHub
commit 1f75479170
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 3381 additions and 2639 deletions

View file

@ -1,6 +1,6 @@
language: rust
rust:
- 1.30.0
- 1.32.0
- stable
- beta
- nightly

1023
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -33,27 +33,27 @@ path = "playback"
path = "protocol"
[dependencies]
base64 = "0.5.0"
env_logger = "0.6.1"
futures = "0.1.8"
getopts = "0.2.14"
hyper = "0.11.2"
log = "0.3.5"
num-bigint = "0.1.35"
protobuf = "1.1"
rand = "0.6"
rpassword = "0.3.0"
tokio-core = "0.1.2"
base64 = "0.10"
env_logger = "0.6"
futures = "0.1"
getopts = "0.2"
hyper = "0.11"
log = "0.4"
num-bigint = "0.2"
protobuf = "2.7"
rand = "0.7"
rpassword = "3.0"
tokio-core = "0.1"
tokio-io = "0.1"
tokio-process = "0.2.2"
tokio-signal = "0.1.2"
url = "1.7.0"
sha-1 = "0.8.0"
hex = "0.3.2"
tokio-process = "0.2"
tokio-signal = "0.2"
url = "1.7"
sha-1 = "0.8"
hex = "0.3"
[build-dependencies]
rand = "0.6"
vergen = "0.1.0"
rand = "0.7"
vergen = "3.0"
[features]
alsa-backend = ["librespot-playback/alsa-backend"]

View file

@ -26,7 +26,7 @@ If you wish to learn more about how librespot works overall, the best way is to
If you run into a bug when using librespot, please search the existing issues before opening a new one. Chances are, we've encountered it before, and have provided a resolution. If not, please open a new one, and where possible, include the backtrace librespot generates on crashing, along with anything we can use to reproduce the issue, eg. the Spotify URI of the song that caused the crash.
# Building
Rust 1.30.0 or later is required to build librespot.
Rust 1.32.0 or later is required to build librespot.
We recently switched to using [Rodio](https://github.com/tomaka/rodio) for audio playback by default, hene for macOS and Windows, you should just be able to clone and build librespot (with the command below). For linux, you will need to run the additional commands below, depending on your distro.

View file

@ -7,15 +7,15 @@ authors = ["Paul Lietar <paul@lietar.net>"]
path = "../core"
[dependencies]
bit-set = "0.4.0"
byteorder = "1.0"
futures = "0.1.8"
lewton = "0.9.3"
log = "0.3.5"
num-bigint = "0.1.35"
num-traits = "0.1.36"
tempfile = "2.1"
aes-ctr = "0.3.0"
bit-set = "0.5"
byteorder = "1.3"
futures = "0.1"
lewton = "0.9"
log = "0.4"
num-bigint = "0.2"
num-traits = "0.2"
tempfile = "3.1"
aes-ctr = "0.3"
tremor = { git = "https://github.com/plietar/rust-tremor", optional = true }
vorbis = { version ="0.1.0", optional = true }

View file

@ -61,7 +61,7 @@ impl AudioFileOpenStreaming {
});
let mut write_file = NamedTempFile::new().unwrap();
write_file.set_len(size as u64).unwrap();
write_file.as_file().set_len(size as u64).unwrap();
write_file.seek(SeekFrom::Start(0)).unwrap();
let read_file = write_file.reopen().unwrap();

View file

@ -11,22 +11,22 @@ path = "../playback"
path = "../protocol"
[dependencies]
base64 = "0.5.0"
futures = "0.1.8"
hyper = "0.11.2"
log = "0.3.5"
num-bigint = "0.1.35"
protobuf = "2.0.5"
rand = "0.6"
base64 = "0.10"
futures = "0.1"
hyper = "0.11"
log = "0.4"
num-bigint = "0.2"
protobuf = "2.7"
rand = "0.7"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
tokio-core = "0.1.2"
url = "1.3"
sha-1 = "0.8.0"
hmac = "0.7.0"
aes-ctr = "0.3.0"
block-modes = "0.2.0"
tokio-core = "0.1"
url = "1.7"
sha-1 = "0.8"
hmac = "0.7"
aes-ctr = "0.3"
block-modes = "0.3"
dns-sd = { version = "0.1.3", optional = true }
mdns = { git = "https://github.com/plietar/rust-mdns", optional = true }

View file

@ -8,36 +8,36 @@ build = "build.rs"
path = "../protocol"
[dependencies]
base64 = "0.5.0"
byteorder = "1.0"
base64 = "0.10"
byteorder = "1.3"
bytes = "0.4"
error-chain = { version = "0.11.0", default_features = false }
extprim = "1.5.1"
futures = "0.1.8"
httparse = "1.2.4"
hyper = "0.11.2"
hyper-proxy = { version = "0.4.1", default_features = false }
lazy_static = "0.2.0"
log = "0.3.5"
num-bigint = "0.1.35"
num-integer = "0.1.32"
num-traits = "0.1.36"
protobuf = "2.0.5"
rand = "0.6"
error-chain = { version = "0.12", default_features = false }
extprim = "1.7"
futures = "0.1"
httparse = "1.3"
hyper = "0.11"
hyper-proxy = { version = "0.4", default_features = false }
lazy_static = "1.3"
log = "0.4"
num-bigint = "0.2"
num-integer = "0.1"
num-traits = "0.2"
protobuf = "2.7"
rand = "0.7"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"
shannon = "0.2.0"
tokio-codec = "0.1.1"
tokio-core = "0.1.2"
tokio-codec = "0.1"
tokio-core = "0.1"
tokio-io = "0.1"
url = "1.7.0"
uuid = { version = "0.4", features = ["v4"] }
sha-1 = "0.8.0"
hmac = "0.7.0"
pbkdf2 = "0.3.0"
aes = "0.3.0"
url = "1.7"
uuid = { version = "0.7", features = ["v4"] }
sha-1 = "0.8"
hmac = "0.7"
pbkdf2 = "0.3"
aes = "0.3"
[build-dependencies]
rand = "0.6"
rand = "0.7"
vergen = "0.1.0"

View file

@ -15,7 +15,7 @@ pub struct SessionConfig {
impl Default for SessionConfig {
fn default() -> SessionConfig {
let device_id = Uuid::new_v4().hyphenated().to_string();
let device_id = Uuid::new_v4().to_hyphenated().to_string();
SessionConfig {
user_agent: version::version_string(),
device_id: device_id,

View file

@ -1,6 +1,6 @@
use std::io;
use std::sync::{Arc, RwLock, Weak};
use std::sync::atomic::{ATOMIC_USIZE_INIT, AtomicUsize, Ordering};
use std::sync::atomic::{AtomicUsize, Ordering};
use std::time::{SystemTime, UNIX_EPOCH};
use byteorder::{BigEndian, ByteOrder};
@ -42,7 +42,7 @@ struct SessionInternal {
session_id: usize,
}
static SESSION_COUNTER: AtomicUsize = ATOMIC_USIZE_INIT;
static SESSION_COUNTER: AtomicUsize = AtomicUsize::new(0);
#[derive(Clone)]
pub struct Session(Arc<SessionInternal>);

View file

@ -4,10 +4,10 @@ version = "0.1.0"
authors = ["Paul Lietar <paul@lietar.net>"]
[dependencies]
byteorder = "1.0"
futures = "0.1.8"
linear-map = "1.0"
protobuf = "2.0.5"
byteorder = "1.3"
futures = "0.1"
linear-map = "1.2"
protobuf = "2.7"
[dependencies.librespot-core]
path = "../core"

View file

@ -11,9 +11,9 @@ path = "../core"
path = "../metadata"
[dependencies]
futures = "0.1.8"
log = "0.3.5"
byteorder = "1.2.1"
futures = "0.1"
log = "0.4"
byteorder = "1.3"
alsa = { version = "0.2.1", optional = true }
portaudio-rs = { version = "0.3.0", optional = true }
@ -21,7 +21,7 @@ libpulse-sys = { version = "0.0.0", optional = true }
jack = { version = "0.5.3", optional = true }
libc = { version = "0.2", optional = true }
rodio = { git = "https://github.com/tomaka/rodio", optional = true, default-features = false }
cpal = { version = "*", optional = true }
cpal = { version = "0.8", optional = true }
sdl2 = { version = "0.32", optional = true }
[features]

View file

@ -5,7 +5,7 @@ authors = ["Paul Liétar <paul@lietar.net>"]
build = "build.rs"
[dependencies]
protobuf = "2.0.5"
protobuf = "2.7"
[build-dependencies]
protobuf-codegen-pure = "2.0.5"
protobuf-codegen-pure = "2.7"

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
// This file is generated by rust-protobuf 2.0.5. Do not edit
// This file is generated by rust-protobuf 2.7.0. Do not edit
// @generated
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
@ -17,17 +17,28 @@
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `mercury.proto`
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
#[derive(PartialEq,Clone,Default)]
pub struct MercuryMultiGetRequest {
// message fields
request: ::protobuf::RepeatedField<MercuryRequest>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a MercuryMultiGetRequest {
fn default() -> &'a MercuryMultiGetRequest {
<MercuryMultiGetRequest as ::protobuf::Message>::default_instance()
}
}
impl MercuryMultiGetRequest {
@ -37,6 +48,10 @@ impl MercuryMultiGetRequest {
// repeated .MercuryRequest request = 1;
pub fn get_request(&self) -> &[MercuryRequest] {
&self.request
}
pub fn clear_request(&mut self) {
self.request.clear();
}
@ -55,10 +70,6 @@ impl MercuryMultiGetRequest {
pub fn take_request(&mut self) -> ::protobuf::RepeatedField<MercuryRequest> {
::std::mem::replace(&mut self.request, ::protobuf::RepeatedField::new())
}
pub fn get_request(&self) -> &[MercuryRequest] {
&self.request
}
}
impl ::protobuf::Message for MercuryMultiGetRequest {
@ -174,7 +185,7 @@ impl ::protobuf::Message for MercuryMultiGetRequest {
impl ::protobuf::Clear for MercuryMultiGetRequest {
fn clear(&mut self) {
self.clear_request();
self.request.clear();
self.unknown_fields.clear();
}
}
@ -196,8 +207,14 @@ pub struct MercuryMultiGetReply {
// message fields
reply: ::protobuf::RepeatedField<MercuryReply>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a MercuryMultiGetReply {
fn default() -> &'a MercuryMultiGetReply {
<MercuryMultiGetReply as ::protobuf::Message>::default_instance()
}
}
impl MercuryMultiGetReply {
@ -207,6 +224,10 @@ impl MercuryMultiGetReply {
// repeated .MercuryReply reply = 1;
pub fn get_reply(&self) -> &[MercuryReply] {
&self.reply
}
pub fn clear_reply(&mut self) {
self.reply.clear();
}
@ -225,10 +246,6 @@ impl MercuryMultiGetReply {
pub fn take_reply(&mut self) -> ::protobuf::RepeatedField<MercuryReply> {
::std::mem::replace(&mut self.reply, ::protobuf::RepeatedField::new())
}
pub fn get_reply(&self) -> &[MercuryReply] {
&self.reply
}
}
impl ::protobuf::Message for MercuryMultiGetReply {
@ -344,7 +361,7 @@ impl ::protobuf::Message for MercuryMultiGetReply {
impl ::protobuf::Clear for MercuryMultiGetReply {
fn clear(&mut self) {
self.clear_reply();
self.reply.clear();
self.unknown_fields.clear();
}
}
@ -369,8 +386,14 @@ pub struct MercuryRequest {
body: ::protobuf::SingularField<::std::vec::Vec<u8>>,
etag: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a MercuryRequest {
fn default() -> &'a MercuryRequest {
<MercuryRequest as ::protobuf::Message>::default_instance()
}
}
impl MercuryRequest {
@ -380,6 +403,13 @@ impl MercuryRequest {
// optional string uri = 1;
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_uri(&mut self) {
self.uri.clear();
}
@ -407,15 +437,15 @@ impl MercuryRequest {
self.uri.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
// optional string content_type = 2;
pub fn get_content_type(&self) -> &str {
match self.content_type.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional string content_type = 2;
pub fn clear_content_type(&mut self) {
self.content_type.clear();
}
@ -443,15 +473,15 @@ impl MercuryRequest {
self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_content_type(&self) -> &str {
match self.content_type.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional bytes body = 3;
pub fn get_body(&self) -> &[u8] {
match self.body.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_body(&mut self) {
self.body.clear();
}
@ -479,15 +509,15 @@ impl MercuryRequest {
self.body.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_body(&self) -> &[u8] {
match self.body.as_ref() {
// optional bytes etag = 4;
pub fn get_etag(&self) -> &[u8] {
match self.etag.as_ref() {
Some(v) => &v,
None => &[],
}
}
// optional bytes etag = 4;
pub fn clear_etag(&mut self) {
self.etag.clear();
}
@ -514,13 +544,6 @@ impl MercuryRequest {
pub fn take_etag(&mut self) -> ::std::vec::Vec<u8> {
self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_etag(&self) -> &[u8] {
match self.etag.as_ref() {
Some(v) => &v,
None => &[],
}
}
}
impl ::protobuf::Message for MercuryRequest {
@ -670,10 +693,10 @@ impl ::protobuf::Message for MercuryRequest {
impl ::protobuf::Clear for MercuryRequest {
fn clear(&mut self) {
self.clear_uri();
self.clear_content_type();
self.clear_body();
self.clear_etag();
self.uri.clear();
self.content_type.clear();
self.body.clear();
self.etag.clear();
self.unknown_fields.clear();
}
}
@ -701,8 +724,14 @@ pub struct MercuryReply {
content_type: ::protobuf::SingularField<::std::string::String>,
body: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a MercuryReply {
fn default() -> &'a MercuryReply {
<MercuryReply as ::protobuf::Message>::default_instance()
}
}
impl MercuryReply {
@ -712,6 +741,10 @@ impl MercuryReply {
// optional sint32 status_code = 1;
pub fn get_status_code(&self) -> i32 {
self.status_code.unwrap_or(0)
}
pub fn clear_status_code(&mut self) {
self.status_code = ::std::option::Option::None;
}
@ -725,12 +758,15 @@ impl MercuryReply {
self.status_code = ::std::option::Option::Some(v);
}
pub fn get_status_code(&self) -> i32 {
self.status_code.unwrap_or(0)
}
// optional string status_message = 2;
pub fn get_status_message(&self) -> &str {
match self.status_message.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_status_message(&mut self) {
self.status_message.clear();
}
@ -758,15 +794,12 @@ impl MercuryReply {
self.status_message.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_status_message(&self) -> &str {
match self.status_message.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional .MercuryReply.CachePolicy cache_policy = 3;
pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy {
self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO)
}
pub fn clear_cache_policy(&mut self) {
self.cache_policy = ::std::option::Option::None;
}
@ -780,12 +813,12 @@ impl MercuryReply {
self.cache_policy = ::std::option::Option::Some(v);
}
pub fn get_cache_policy(&self) -> MercuryReply_CachePolicy {
self.cache_policy.unwrap_or(MercuryReply_CachePolicy::CACHE_NO)
}
// optional sint32 ttl = 4;
pub fn get_ttl(&self) -> i32 {
self.ttl.unwrap_or(0)
}
pub fn clear_ttl(&mut self) {
self.ttl = ::std::option::Option::None;
}
@ -799,12 +832,15 @@ impl MercuryReply {
self.ttl = ::std::option::Option::Some(v);
}
pub fn get_ttl(&self) -> i32 {
self.ttl.unwrap_or(0)
}
// optional bytes etag = 5;
pub fn get_etag(&self) -> &[u8] {
match self.etag.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_etag(&mut self) {
self.etag.clear();
}
@ -832,15 +868,15 @@ impl MercuryReply {
self.etag.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_etag(&self) -> &[u8] {
match self.etag.as_ref() {
Some(v) => &v,
None => &[],
}
}
// optional string content_type = 6;
pub fn get_content_type(&self) -> &str {
match self.content_type.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_content_type(&mut self) {
self.content_type.clear();
}
@ -868,15 +904,15 @@ impl MercuryReply {
self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_content_type(&self) -> &str {
match self.content_type.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional bytes body = 7;
pub fn get_body(&self) -> &[u8] {
match self.body.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_body(&mut self) {
self.body.clear();
}
@ -903,13 +939,6 @@ impl MercuryReply {
pub fn take_body(&mut self) -> ::std::vec::Vec<u8> {
self.body.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_body(&self) -> &[u8] {
match self.body.as_ref() {
Some(v) => &v,
None => &[],
}
}
}
impl ::protobuf::Message for MercuryReply {
@ -1109,13 +1138,13 @@ impl ::protobuf::Message for MercuryReply {
impl ::protobuf::Clear for MercuryReply {
fn clear(&mut self) {
self.clear_status_code();
self.clear_status_message();
self.clear_cache_policy();
self.clear_ttl();
self.clear_etag();
self.clear_content_type();
self.clear_body();
self.status_code = ::std::option::Option::None;
self.status_message.clear();
self.cache_policy = ::std::option::Option::None;
self.ttl = ::std::option::Option::None;
self.etag.clear();
self.content_type.clear();
self.body.clear();
self.unknown_fields.clear();
}
}
@ -1178,6 +1207,13 @@ impl ::protobuf::ProtobufEnum for MercuryReply_CachePolicy {
impl ::std::marker::Copy for MercuryReply_CachePolicy {
}
// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for MercuryReply_CachePolicy {
fn default() -> Self {
MercuryReply_CachePolicy::CACHE_NO
}
}
impl ::protobuf::reflect::ProtobufValue for MercuryReply_CachePolicy {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
@ -1193,8 +1229,14 @@ pub struct Header {
status_code: ::std::option::Option<i32>,
user_fields: ::protobuf::RepeatedField<UserField>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Header {
fn default() -> &'a Header {
<Header as ::protobuf::Message>::default_instance()
}
}
impl Header {
@ -1204,6 +1246,13 @@ impl Header {
// optional string uri = 1;
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_uri(&mut self) {
self.uri.clear();
}
@ -1231,15 +1280,15 @@ impl Header {
self.uri.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
// optional string content_type = 2;
pub fn get_content_type(&self) -> &str {
match self.content_type.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional string content_type = 2;
pub fn clear_content_type(&mut self) {
self.content_type.clear();
}
@ -1267,15 +1316,15 @@ impl Header {
self.content_type.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_content_type(&self) -> &str {
match self.content_type.as_ref() {
// optional string method = 3;
pub fn get_method(&self) -> &str {
match self.method.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional string method = 3;
pub fn clear_method(&mut self) {
self.method.clear();
}
@ -1303,15 +1352,12 @@ impl Header {
self.method.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_method(&self) -> &str {
match self.method.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional sint32 status_code = 4;
pub fn get_status_code(&self) -> i32 {
self.status_code.unwrap_or(0)
}
pub fn clear_status_code(&mut self) {
self.status_code = ::std::option::Option::None;
}
@ -1325,12 +1371,12 @@ impl Header {
self.status_code = ::std::option::Option::Some(v);
}
pub fn get_status_code(&self) -> i32 {
self.status_code.unwrap_or(0)
}
// repeated .UserField user_fields = 6;
pub fn get_user_fields(&self) -> &[UserField] {
&self.user_fields
}
pub fn clear_user_fields(&mut self) {
self.user_fields.clear();
}
@ -1349,10 +1395,6 @@ impl Header {
pub fn take_user_fields(&mut self) -> ::protobuf::RepeatedField<UserField> {
::std::mem::replace(&mut self.user_fields, ::protobuf::RepeatedField::new())
}
pub fn get_user_fields(&self) -> &[UserField] {
&self.user_fields
}
}
impl ::protobuf::Message for Header {
@ -1528,11 +1570,11 @@ impl ::protobuf::Message for Header {
impl ::protobuf::Clear for Header {
fn clear(&mut self) {
self.clear_uri();
self.clear_content_type();
self.clear_method();
self.clear_status_code();
self.clear_user_fields();
self.uri.clear();
self.content_type.clear();
self.method.clear();
self.status_code = ::std::option::Option::None;
self.user_fields.clear();
self.unknown_fields.clear();
}
}
@ -1555,8 +1597,14 @@ pub struct UserField {
key: ::protobuf::SingularField<::std::string::String>,
value: ::protobuf::SingularField<::std::vec::Vec<u8>>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a UserField {
fn default() -> &'a UserField {
<UserField as ::protobuf::Message>::default_instance()
}
}
impl UserField {
@ -1566,6 +1614,13 @@ impl UserField {
// optional string key = 1;
pub fn get_key(&self) -> &str {
match self.key.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_key(&mut self) {
self.key.clear();
}
@ -1593,15 +1648,15 @@ impl UserField {
self.key.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_key(&self) -> &str {
match self.key.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional bytes value = 2;
pub fn get_value(&self) -> &[u8] {
match self.value.as_ref() {
Some(v) => &v,
None => &[],
}
}
pub fn clear_value(&mut self) {
self.value.clear();
}
@ -1628,13 +1683,6 @@ impl UserField {
pub fn take_value(&mut self) -> ::std::vec::Vec<u8> {
self.value.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn get_value(&self) -> &[u8] {
match self.value.as_ref() {
Some(v) => &v,
None => &[],
}
}
}
impl ::protobuf::Message for UserField {
@ -1756,8 +1804,8 @@ impl ::protobuf::Message for UserField {
impl ::protobuf::Clear for UserField {
fn clear(&mut self) {
self.clear_key();
self.clear_value();
self.key.clear();
self.value.clear();
self.unknown_fields.clear();
}
}
@ -1775,27 +1823,24 @@ impl ::protobuf::reflect::ProtobufValue for UserField {
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12$\n\x07request\
\x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\x02\x18\0\"8\n\x14MercuryMult\
iGetReply\x12\x20\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\x02\
\x18\0\"_\n\x0eMercuryRequest\x12\x0f\n\x03uri\x18\x01\x20\x01(\tB\x02\
\x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\x18\0\x12\x10\n\
\x04body\x18\x03\x20\x01(\x0cB\x02\x18\0\x12\x10\n\x04etag\x18\x04\x20\
\x01(\x0cB\x02\x18\0\"\x8d\x02\n\x0cMercuryReply\x12\x17\n\x0bstatus_cod\
e\x18\x01\x20\x01(\x11B\x02\x18\0\x12\x1a\n\x0estatus_message\x18\x02\
\x20\x01(\tB\x02\x18\0\x123\n\x0ccache_policy\x18\x03\x20\x01(\x0e2\x19.\
MercuryReply.CachePolicyB\x02\x18\0\x12\x0f\n\x03ttl\x18\x04\x20\x01(\
\x11B\x02\x18\0\x12\x10\n\x04etag\x18\x05\x20\x01(\x0cB\x02\x18\0\x12\
\x18\n\x0ccontent_type\x18\x06\x20\x01(\tB\x02\x18\0\x12\x10\n\x04body\
\x18\x07\x20\x01(\x0cB\x02\x18\0\"D\n\x0bCachePolicy\x12\x0c\n\x08CACHE_\
NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\x10\x02\x12\x10\n\x0cCACHE_PUBLIC\
\x10\x03\x1a\x02\x10\0\"\x85\x01\n\x06Header\x12\x0f\n\x03uri\x18\x01\
\x20\x01(\tB\x02\x18\0\x12\x18\n\x0ccontent_type\x18\x02\x20\x01(\tB\x02\
\x18\0\x12\x12\n\x06method\x18\x03\x20\x01(\tB\x02\x18\0\x12\x17\n\x0bst\
atus_code\x18\x04\x20\x01(\x11B\x02\x18\0\x12#\n\x0buser_fields\x18\x06\
\x20\x03(\x0b2\n.UserFieldB\x02\x18\0\"/\n\tUserField\x12\x0f\n\x03key\
\x18\x01\x20\x01(\tB\x02\x18\0\x12\x11\n\x05value\x18\x02\x20\x01(\x0cB\
\x02\x18\0B\0b\x06proto2\
\n\rmercury.proto\x12\0\">\n\x16MercuryMultiGetRequest\x12\"\n\x07reques\
t\x18\x01\x20\x03(\x0b2\x0f.MercuryRequestB\0:\0\"8\n\x14MercuryMultiGet\
Reply\x12\x1e\n\x05reply\x18\x01\x20\x03(\x0b2\r.MercuryReplyB\0:\0\"Y\n\
\x0eMercuryRequest\x12\r\n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccon\
tent_type\x18\x02\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x03\x20\x01(\x0cB\
\0\x12\x0e\n\x04etag\x18\x04\x20\x01(\x0cB\0:\0\"\xff\x01\n\x0cMercuryRe\
ply\x12\x15\n\x0bstatus_code\x18\x01\x20\x01(\x11B\0\x12\x18\n\x0estatus\
_message\x18\x02\x20\x01(\tB\0\x121\n\x0ccache_policy\x18\x03\x20\x01(\
\x0e2\x19.MercuryReply.CachePolicyB\0\x12\r\n\x03ttl\x18\x04\x20\x01(\
\x11B\0\x12\x0e\n\x04etag\x18\x05\x20\x01(\x0cB\0\x12\x16\n\x0ccontent_t\
ype\x18\x06\x20\x01(\tB\0\x12\x0e\n\x04body\x18\x07\x20\x01(\x0cB\0\"B\n\
\x0bCachePolicy\x12\x0c\n\x08CACHE_NO\x10\x01\x12\x11\n\rCACHE_PRIVATE\
\x10\x02\x12\x10\n\x0cCACHE_PUBLIC\x10\x03\x1a\0:\0\"}\n\x06Header\x12\r\
\n\x03uri\x18\x01\x20\x01(\tB\0\x12\x16\n\x0ccontent_type\x18\x02\x20\
\x01(\tB\0\x12\x10\n\x06method\x18\x03\x20\x01(\tB\0\x12\x15\n\x0bstatus\
_code\x18\x04\x20\x01(\x11B\0\x12!\n\x0buser_fields\x18\x06\x20\x03(\x0b\
2\n.UserFieldB\0:\0\"-\n\tUserField\x12\r\n\x03key\x18\x01\x20\x01(\tB\0\
\x12\x0f\n\x05value\x18\x02\x20\x01(\x0cB\0:\0B\0b\x06proto2\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {

File diff suppressed because it is too large Load diff

View file

@ -1,9 +1,9 @@
// This file is generated by rust-protobuf 2.0.5. Do not edit
// This file is generated by rust-protobuf 2.7.0. Do not edit
// @generated
// https://github.com/Manishearth/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy)]
#![allow(clippy::all)]
#![cfg_attr(rustfmt, rustfmt_skip)]
@ -17,10 +17,15 @@
#![allow(unsafe_code)]
#![allow(unused_imports)]
#![allow(unused_results)]
//! Generated file from `pubsub.proto`
use protobuf::Message as Message_imported_for_functions;
use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;
/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_7_0;
#[derive(PartialEq,Clone,Default)]
pub struct Subscription {
// message fields
@ -28,8 +33,14 @@ pub struct Subscription {
expiry: ::std::option::Option<i32>,
status_code: ::std::option::Option<i32>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl<'a> ::std::default::Default for &'a Subscription {
fn default() -> &'a Subscription {
<Subscription as ::protobuf::Message>::default_instance()
}
}
impl Subscription {
@ -39,6 +50,13 @@ impl Subscription {
// optional string uri = 1;
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
Some(v) => &v,
None => "",
}
}
pub fn clear_uri(&mut self) {
self.uri.clear();
}
@ -66,15 +84,12 @@ impl Subscription {
self.uri.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn get_uri(&self) -> &str {
match self.uri.as_ref() {
Some(v) => &v,
None => "",
}
}
// optional int32 expiry = 2;
pub fn get_expiry(&self) -> i32 {
self.expiry.unwrap_or(0)
}
pub fn clear_expiry(&mut self) {
self.expiry = ::std::option::Option::None;
}
@ -88,12 +103,12 @@ impl Subscription {
self.expiry = ::std::option::Option::Some(v);
}
pub fn get_expiry(&self) -> i32 {
self.expiry.unwrap_or(0)
}
// optional int32 status_code = 3;
pub fn get_status_code(&self) -> i32 {
self.status_code.unwrap_or(0)
}
pub fn clear_status_code(&mut self) {
self.status_code = ::std::option::Option::None;
}
@ -106,10 +121,6 @@ impl Subscription {
pub fn set_status_code(&mut self, v: i32) {
self.status_code = ::std::option::Option::Some(v);
}
pub fn get_status_code(&self) -> i32 {
self.status_code.unwrap_or(0)
}
}
impl ::protobuf::Message for Subscription {
@ -253,9 +264,9 @@ impl ::protobuf::Message for Subscription {
impl ::protobuf::Clear for Subscription {
fn clear(&mut self) {
self.clear_uri();
self.clear_expiry();
self.clear_status_code();
self.uri.clear();
self.expiry = ::std::option::Option::None;
self.status_code = ::std::option::Option::None;
self.unknown_fields.clear();
}
}
@ -273,10 +284,9 @@ impl ::protobuf::reflect::ProtobufValue for Subscription {
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x0cpubsub.proto\x12\0\"L\n\x0cSubscription\x12\x0f\n\x03uri\x18\x01\
\x20\x01(\tB\x02\x18\0\x12\x12\n\x06expiry\x18\x02\x20\x01(\x05B\x02\x18\
\0\x12\x17\n\x0bstatus_code\x18\x03\x20\x01(\x05B\x02\x18\0B\0b\x06proto\
2\
\n\x0cpubsub.proto\x12\0\"H\n\x0cSubscription\x12\r\n\x03uri\x18\x01\x20\
\x01(\tB\0\x12\x10\n\x06expiry\x18\x02\x20\x01(\x05B\0\x12\x15\n\x0bstat\
us_code\x18\x03\x20\x01(\x05B\0:\0B\0b\x06proto2\
";
static mut file_descriptor_proto_lazy: ::protobuf::lazy::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::lazy::Lazy {

File diff suppressed because it is too large Load diff

View file

@ -397,7 +397,7 @@ impl Main {
spirc: None,
spirc_task: None,
shutdown: false,
signal: Box::new(tokio_signal::ctrl_c(&handle).flatten_stream()),
signal: Box::new(tokio_signal::ctrl_c().flatten_stream()),
player_event_channel: None,
player_event_program: setup.player_event_program,