Bump protobuf-macros version and use the simpler string literal syntax

This commit is contained in:
Paul Lietar 2016-02-22 05:48:58 +00:00
parent c700315b30
commit c3c258dfaf
2 changed files with 24 additions and 16 deletions

14
Cargo.lock generated
View file

@ -13,7 +13,7 @@ dependencies = [
"num 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)", "num 0.1.31 (registry+https://github.com/rust-lang/crates.io-index)",
"portaudio 0.2.0 (git+https://github.com/mvdnes/portaudio-rs)", "portaudio 0.2.0 (git+https://github.com/mvdnes/portaudio-rs)",
"protobuf 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "protobuf 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"protobuf_macros 0.1.2 (git+https://github.com/plietar/rust-protobuf-macros.git)", "protobuf_macros 0.2.0 (git+https://github.com/plietar/rust-protobuf-macros.git)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", "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.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)", "rust-crypto 0.2.34 (registry+https://github.com/rust-lang/crates.io-index)",
@ -32,6 +32,11 @@ name = "ascii"
version = "0.5.4" version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "aster"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "bit-set" name = "bit-set"
version = "0.2.0" version = "0.2.0"
@ -279,8 +284,11 @@ dependencies = [
[[package]] [[package]]
name = "protobuf_macros" name = "protobuf_macros"
version = "0.1.2" version = "0.2.0"
source = "git+https://github.com/plietar/rust-protobuf-macros.git#37c6a34e6024059e1781058a0f0a3af7a783b094" source = "git+https://github.com/plietar/rust-protobuf-macros.git#5853fc344d506728fa497eaccb83f0a8a82f9150"
dependencies = [
"aster 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "rand" name = "rand"

View file

@ -358,23 +358,23 @@ impl SpircInternal {
@{ @{
typ: protocol::spirc::CapabilityType::kSupportedContexts, typ: protocol::spirc::CapabilityType::kSupportedContexts,
stringValue => [ stringValue => [
"album".to_owned(), "album",
"playlist".to_owned(), "playlist",
"search".to_owned(), "search",
"inbox".to_owned(), "inbox",
"toplist".to_owned(), "toplist",
"starred".to_owned(), "starred",
"publishedstarred".to_owned(), "publishedstarred",
"track".to_owned(), "track",
] ]
}, },
@{ @{
typ: protocol::spirc::CapabilityType::kSupportedTypes, typ: protocol::spirc::CapabilityType::kSupportedTypes,
stringValue => [ stringValue => [
"audio/local".to_owned(), "audio/local",
"audio/track".to_owned(), "audio/track",
"local".to_owned(), "local",
"track".to_owned(), "track",
] ]
} }
], ],
@ -430,7 +430,7 @@ impl<'a> CommandSender<'a> {
let mut pkt = protobuf_init!(protocol::spirc::Frame::new(), { let mut pkt = protobuf_init!(protocol::spirc::Frame::new(), {
version: 1, version: 1,
ident: self.spirc_internal.ident.clone(), ident: self.spirc_internal.ident.clone(),
protocol_version: "2.0.0".to_owned(), protocol_version: "2.0.0",
seq_nr: { self.spirc_internal.seq_nr += 1; self.spirc_internal.seq_nr }, seq_nr: { self.spirc_internal.seq_nr += 1; self.spirc_internal.seq_nr },
typ: self.cmd, typ: self.cmd,
recipient: RepeatedField::from_vec( recipient: RepeatedField::from_vec(