From 3b5f9ac64c3797ac15a26b5cdeb5d334ce60d616 Mon Sep 17 00:00:00 2001 From: henenq Date: Mon, 16 Dec 2019 12:47:52 +0100 Subject: [PATCH] Rebase, fix broken things --- Cargo.lock | 1 + metadata/Cargo.toml | 1 + metadata/src/lib.rs | 10 +++--- protocol/build.rs | 11 ++++-- protocol/src/playlist4changes.rs | 58 ++++++++++++++++---------------- protocol/src/playlist4content.rs | 28 +++++++-------- protocol/src/playlist4issues.rs | 16 ++++----- protocol/src/playlist4meta.rs | 40 +++++++++++----------- protocol/src/playlist4ops.rs | 58 ++++++++++++++++---------------- 9 files changed, 116 insertions(+), 107 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3daf9932..594b80c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -886,6 +886,7 @@ dependencies = [ "librespot-core 0.1.0", "librespot-protocol 0.1.0", "linear-map 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "log 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 2.8.1 (registry+https://github.com/rust-lang/crates.io-index)", ] diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 6983b4b1..75028195 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -10,6 +10,7 @@ byteorder = "1.3" futures = "0.1" linear-map = "1.2" protobuf = "2.8.1" +log = "0.4" [dependencies.librespot-core] path = "../core" diff --git a/metadata/src/lib.rs b/metadata/src/lib.rs index 889662c3..677e4669 100644 --- a/metadata/src/lib.rs +++ b/metadata/src/lib.rs @@ -131,7 +131,7 @@ pub trait Metadata: Send + Sized + 'static { fn parse(msg: &Self::Message, session: &Session) -> Self; fn get(session: &Session, id: SpotifyId) -> Box> { - let uri = format!("{}/{}", Self::base_url(), id.to_base16()); + let uri = Self::request_url(id); let request = session.mercury().get(uri); let session = session.clone(); @@ -362,8 +362,8 @@ impl Metadata for Artist { impl Metadata for Episode { type Message = protocol::metadata::Episode; - fn base_url() -> &'static str { - "hm://metadata/3/episode" + fn request_url(id: SpotifyId) -> String { + format!("hm://metadata/3/episode/{}", id.to_base16()) } fn parse(msg: &Self::Message, session: &Session) -> Self { @@ -410,8 +410,8 @@ impl Metadata for Episode { impl Metadata for Show { type Message = protocol::metadata::Show; - fn base_url() -> &'static str { - "hm://metadata/3/show" + fn request_url(id: SpotifyId) -> String { + format!("hm://metadata/3/show/{}", id.to_base16()) } fn parse(msg: &Self::Message, _: &Session) -> Self { diff --git a/protocol/build.rs b/protocol/build.rs index ec6fff84..c7f19acb 100644 --- a/protocol/build.rs +++ b/protocol/build.rs @@ -14,11 +14,18 @@ fn main() { // Iterate over the desired module names. for line in lib_str.lines() { - if !line.starts_with("pub mod ") { + if !line.starts_with("pub mod ") && !line.starts_with("mod ") { continue; } let len = line.len(); - let name = &line[8..len-1]; // Remove keywords and semi-colon + + let name; + if line.starts_with("pub mod ") { + name = &line[8..len-1]; // Remove keywords and semi-colon + } + else { + name = &line[4..len-1]; // Remove keywords and semi-colon + } // Build the paths to relevant files. let src = &format!("proto/{}.proto", name); diff --git a/protocol/src/playlist4changes.rs b/protocol/src/playlist4changes.rs index d70b8235..3fefbdd1 100644 --- a/protocol/src/playlist4changes.rs +++ b/protocol/src/playlist4changes.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit +// This file is generated by rust-protobuf 2.8.1. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 @@ -24,7 +24,7 @@ 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_8_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1; #[derive(PartialEq,Clone,Default)] pub struct ChangeInfo { @@ -228,7 +228,7 @@ impl ::protobuf::Message for ChangeInfo { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -325,7 +325,7 @@ impl ::protobuf::Message for ChangeInfo { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.user.as_ref() { os.write_string(1, &v)?; } @@ -467,7 +467,7 @@ impl ::protobuf::Clear for ChangeInfo { } impl ::std::fmt::Debug for ChangeInfo { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -610,7 +610,7 @@ impl ::protobuf::Message for Delta { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -651,7 +651,7 @@ impl ::protobuf::Message for Delta { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.base_version.as_ref() { os.write_bytes(1, &v)?; } @@ -752,7 +752,7 @@ impl ::protobuf::Clear for Delta { } impl ::std::fmt::Debug for Delta { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -901,7 +901,7 @@ impl ::protobuf::Message for Merge { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -941,7 +941,7 @@ impl ::protobuf::Message for Merge { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.base_version.as_ref() { os.write_bytes(1, &v)?; } @@ -1040,7 +1040,7 @@ impl ::protobuf::Clear for Merge { } impl ::std::fmt::Debug for Merge { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1174,7 +1174,7 @@ impl ::protobuf::Message for ChangeSet { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1215,7 +1215,7 @@ impl ::protobuf::Message for ChangeSet { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.kind { os.write_enum(1, v.value())?; } @@ -1316,7 +1316,7 @@ impl ::protobuf::Clear for ChangeSet { } impl ::std::fmt::Debug for ChangeSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1486,7 +1486,7 @@ impl ::protobuf::Message for RevisionTaggedChangeSet { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1520,7 +1520,7 @@ impl ::protobuf::Message for RevisionTaggedChangeSet { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.revision.as_ref() { os.write_bytes(1, &v)?; } @@ -1610,7 +1610,7 @@ impl ::protobuf::Clear for RevisionTaggedChangeSet { } impl ::std::fmt::Debug for RevisionTaggedChangeSet { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1751,7 +1751,7 @@ impl ::protobuf::Message for Diff { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1791,7 +1791,7 @@ impl ::protobuf::Message for Diff { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.from_revision.as_ref() { os.write_bytes(1, &v)?; } @@ -1890,7 +1890,7 @@ impl ::protobuf::Clear for Diff { } impl ::std::fmt::Debug for Diff { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -2131,7 +2131,7 @@ impl ::protobuf::Message for ListDump { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2196,7 +2196,7 @@ impl ::protobuf::Message for ListDump { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.latestRevision.as_ref() { os.write_bytes(1, &v)?; } @@ -2328,7 +2328,7 @@ impl ::protobuf::Clear for ListDump { } impl ::std::fmt::Debug for ListDump { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -2537,7 +2537,7 @@ impl ::protobuf::Message for ListChanges { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2604,7 +2604,7 @@ impl ::protobuf::Message for ListChanges { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.baseRevision.as_ref() { os.write_bytes(1, &v)?; } @@ -2732,7 +2732,7 @@ impl ::protobuf::Clear for ListChanges { } impl ::std::fmt::Debug for ListChanges { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -3211,7 +3211,7 @@ impl ::protobuf::Message for SelectedListContent { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -3335,7 +3335,7 @@ impl ::protobuf::Message for SelectedListContent { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.revision.as_ref() { os.write_bytes(1, &v)?; } @@ -3545,7 +3545,7 @@ impl ::protobuf::Clear for SelectedListContent { } impl ::std::fmt::Debug for SelectedListContent { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } diff --git a/protocol/src/playlist4content.rs b/protocol/src/playlist4content.rs index 0ea1e63b..c92f6870 100644 --- a/protocol/src/playlist4content.rs +++ b/protocol/src/playlist4content.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit +// This file is generated by rust-protobuf 2.8.1. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 @@ -24,7 +24,7 @@ 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_8_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1; #[derive(PartialEq,Clone,Default)] pub struct Item { @@ -127,7 +127,7 @@ impl ::protobuf::Message for Item { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -161,7 +161,7 @@ impl ::protobuf::Message for Item { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.uri.as_ref() { os.write_string(1, &v)?; } @@ -251,7 +251,7 @@ impl ::protobuf::Clear for Item { } impl ::std::fmt::Debug for Item { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -358,7 +358,7 @@ impl ::protobuf::Message for ListItems { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -406,7 +406,7 @@ impl ::protobuf::Message for ListItems { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.pos { os.write_int32(1, v)?; } @@ -505,7 +505,7 @@ impl ::protobuf::Clear for ListItems { } impl ::std::fmt::Debug for ListItems { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -581,7 +581,7 @@ impl ::protobuf::Message for ContentRange { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -622,7 +622,7 @@ impl ::protobuf::Message for ContentRange { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.pos { os.write_int32(1, v)?; } @@ -710,7 +710,7 @@ impl ::protobuf::Clear for ContentRange { } impl ::std::fmt::Debug for ContentRange { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1081,7 +1081,7 @@ impl ::protobuf::Message for ListContentSelection { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1215,7 +1215,7 @@ impl ::protobuf::Message for ListContentSelection { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.wantRevision { os.write_bool(1, v)?; } @@ -1408,7 +1408,7 @@ impl ::protobuf::Clear for ListContentSelection { } impl ::std::fmt::Debug for ListContentSelection { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } diff --git a/protocol/src/playlist4issues.rs b/protocol/src/playlist4issues.rs index 845421e2..54aa1627 100644 --- a/protocol/src/playlist4issues.rs +++ b/protocol/src/playlist4issues.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit +// This file is generated by rust-protobuf 2.8.1. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 @@ -24,7 +24,7 @@ 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_8_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1; #[derive(PartialEq,Clone,Default)] pub struct ClientIssue { @@ -111,7 +111,7 @@ impl ::protobuf::Message for ClientIssue { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -154,7 +154,7 @@ impl ::protobuf::Message for ClientIssue { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.level { os.write_enum(1, v.value())?; } @@ -251,7 +251,7 @@ impl ::protobuf::Clear for ClientIssue { } impl ::std::fmt::Debug for ClientIssue { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -461,7 +461,7 @@ impl ::protobuf::Message for ClientResolveAction { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -494,7 +494,7 @@ impl ::protobuf::Message for ClientResolveAction { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.code { os.write_enum(1, v.value())?; } @@ -582,7 +582,7 @@ impl ::protobuf::Clear for ClientResolveAction { } impl ::std::fmt::Debug for ClientResolveAction { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } diff --git a/protocol/src/playlist4meta.rs b/protocol/src/playlist4meta.rs index 08ff266e..145105e7 100644 --- a/protocol/src/playlist4meta.rs +++ b/protocol/src/playlist4meta.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit +// This file is generated by rust-protobuf 2.8.1. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 @@ -24,7 +24,7 @@ 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_8_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1; #[derive(PartialEq,Clone,Default)] pub struct ListChecksum { @@ -108,7 +108,7 @@ impl ::protobuf::Message for ListChecksum { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -145,7 +145,7 @@ impl ::protobuf::Message for ListChecksum { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.version { os.write_int32(1, v)?; } @@ -233,7 +233,7 @@ impl ::protobuf::Clear for ListChecksum { } impl ::std::fmt::Debug for ListChecksum { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -289,7 +289,7 @@ impl ::protobuf::Message for DownloadFormat { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -316,7 +316,7 @@ impl ::protobuf::Message for DownloadFormat { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.codec { os.write_enum(1, v.value())?; } @@ -395,7 +395,7 @@ impl ::protobuf::Clear for DownloadFormat { } impl ::std::fmt::Debug for DownloadFormat { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -777,7 +777,7 @@ impl ::protobuf::Message for ListAttributes { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -878,7 +878,7 @@ impl ::protobuf::Message for ListAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.name.as_ref() { os.write_string(1, &v)?; } @@ -1038,7 +1038,7 @@ impl ::protobuf::Clear for ListAttributes { } impl ::std::fmt::Debug for ListAttributes { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1344,7 +1344,7 @@ impl ::protobuf::Message for ItemAttributes { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1450,7 +1450,7 @@ impl ::protobuf::Message for ItemAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.added_by.as_ref() { os.write_string(1, &v)?; } @@ -1612,7 +1612,7 @@ impl ::protobuf::Clear for ItemAttributes { } impl ::std::fmt::Debug for ItemAttributes { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1722,7 +1722,7 @@ impl ::protobuf::Message for StringAttribute { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1755,7 +1755,7 @@ impl ::protobuf::Message for StringAttribute { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.key.as_ref() { os.write_string(1, &v)?; } @@ -1843,7 +1843,7 @@ impl ::protobuf::Clear for StringAttribute { } impl ::std::fmt::Debug for StringAttribute { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1910,7 +1910,7 @@ impl ::protobuf::Message for StringAttributes { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1938,7 +1938,7 @@ impl ::protobuf::Message for StringAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.attribute { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2019,7 +2019,7 @@ impl ::protobuf::Clear for StringAttributes { } impl ::std::fmt::Debug for StringAttributes { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } diff --git a/protocol/src/playlist4ops.rs b/protocol/src/playlist4ops.rs index df2deced..db92f760 100644 --- a/protocol/src/playlist4ops.rs +++ b/protocol/src/playlist4ops.rs @@ -1,4 +1,4 @@ -// This file is generated by rust-protobuf 2.8.0. Do not edit +// This file is generated by rust-protobuf 2.8.1. Do not edit // @generated // https://github.com/Manishearth/rust-clippy/issues/702 @@ -24,7 +24,7 @@ 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_8_0; +const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_8_1; #[derive(PartialEq,Clone,Default)] pub struct Add { @@ -181,7 +181,7 @@ impl ::protobuf::Message for Add { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -246,7 +246,7 @@ impl ::protobuf::Message for Add { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.fromIndex { os.write_int32(1, v)?; } @@ -365,7 +365,7 @@ impl ::protobuf::Clear for Add { } impl ::std::fmt::Debug for Add { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -609,7 +609,7 @@ impl ::protobuf::Message for Rem { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -688,7 +688,7 @@ impl ::protobuf::Message for Rem { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.fromIndex { os.write_int32(1, v)?; } @@ -829,7 +829,7 @@ impl ::protobuf::Clear for Rem { } impl ::std::fmt::Debug for Rem { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1042,7 +1042,7 @@ impl ::protobuf::Message for Mov { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1114,7 +1114,7 @@ impl ::protobuf::Message for Mov { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.fromIndex { os.write_int32(1, v)?; } @@ -1244,7 +1244,7 @@ impl ::protobuf::Clear for Mov { } impl ::std::fmt::Debug for Mov { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1345,7 +1345,7 @@ impl ::protobuf::Message for ItemAttributesPartialState { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1379,7 +1379,7 @@ impl ::protobuf::Message for ItemAttributesPartialState { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.values.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1469,7 +1469,7 @@ impl ::protobuf::Clear for ItemAttributesPartialState { } impl ::std::fmt::Debug for ItemAttributesPartialState { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -1652,7 +1652,7 @@ impl ::protobuf::Message for ListAttributesPartialState { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -1686,7 +1686,7 @@ impl ::protobuf::Message for ListAttributesPartialState { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.values.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -1776,7 +1776,7 @@ impl ::protobuf::Clear for ListAttributesPartialState { } impl ::std::fmt::Debug for ListAttributesPartialState { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -2061,7 +2061,7 @@ impl ::protobuf::Message for UpdateItemAttributes { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2120,7 +2120,7 @@ impl ::protobuf::Message for UpdateItemAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.index { os.write_int32(1, v)?; } @@ -2243,7 +2243,7 @@ impl ::protobuf::Clear for UpdateItemAttributes { } impl ::std::fmt::Debug for UpdateItemAttributes { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -2435,7 +2435,7 @@ impl ::protobuf::Message for UpdateListAttributes { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2484,7 +2484,7 @@ impl ::protobuf::Message for UpdateListAttributes { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(ref v) = self.new_attributes.as_ref() { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -2598,7 +2598,7 @@ impl ::protobuf::Clear for UpdateListAttributes { } impl ::std::fmt::Debug for UpdateListAttributes { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -2849,7 +2849,7 @@ impl ::protobuf::Message for Op { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -2911,7 +2911,7 @@ impl ::protobuf::Message for Op { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { if let Some(v) = self.kind { os.write_enum(1, v.value())?; } @@ -3045,7 +3045,7 @@ impl ::protobuf::Clear for Op { } impl ::std::fmt::Debug for Op { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } } @@ -3179,7 +3179,7 @@ impl ::protobuf::Message for OpList { true } - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream) -> ::protobuf::ProtobufResult<()> { + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { while !is.eof()? { let (field_number, wire_type) = is.read_tag_unpack()?; match field_number { @@ -3207,7 +3207,7 @@ impl ::protobuf::Message for OpList { my_size } - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream) -> ::protobuf::ProtobufResult<()> { + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { for v in &self.ops { os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; os.write_raw_varint32(v.get_cached_size())?; @@ -3288,7 +3288,7 @@ impl ::protobuf::Clear for OpList { } impl ::std::fmt::Debug for OpList { - fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result { + fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result { ::protobuf::text_format::fmt(self, f) } }