Update protobuf to version 2.3.0 (#904)

Initially I had hoped that the deprecated `#![allow(clippy)]` would no
longer be put into the generated rust files, but -- as of 2019-01-30 --
it still is (see [1] for details). Since we explicitly update the
protobuf files I decided to *manually edit the generated code* and
replace this with `#![allow(clippy:all)]`. Hopefully, by the time we do
the next upgrade, no such manual tweaking would be necessary anymore. I
think the benefit of a less polluted clippy output is worth it this
time.

[1]: https://github.com/stepancheg/rust-protobuf/pull/332
This commit is contained in:
Toralf Wittner
2019-01-30 16:25:45 +01:00
committed by GitHub
parent 3b0a322bbd
commit bbf56c6371
16 changed files with 80 additions and 50 deletions

View File

@ -1,9 +1,9 @@
// This file is generated by rust-protobuf 2.0.2. Do not edit
// This file is generated by rust-protobuf 2.3.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)]
@ -31,8 +31,8 @@ pub struct Message {
closerPeers: ::protobuf::RepeatedField<Message_Peer>,
providerPeers: ::protobuf::RepeatedField<Message_Peer>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Message {
@ -430,8 +430,8 @@ pub struct Message_Peer {
addrs: ::protobuf::RepeatedField<::std::vec::Vec<u8>>,
connection: ::std::option::Option<Message_ConnectionType>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Message_Peer {
@ -727,6 +727,12 @@ impl ::protobuf::ProtobufEnum for Message_MessageType {
impl ::std::marker::Copy for Message_MessageType {
}
impl ::std::default::Default for Message_MessageType {
fn default() -> Self {
Message_MessageType::PUT_VALUE
}
}
impl ::protobuf::reflect::ProtobufValue for Message_MessageType {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())
@ -782,6 +788,12 @@ impl ::protobuf::ProtobufEnum for Message_ConnectionType {
impl ::std::marker::Copy for Message_ConnectionType {
}
impl ::std::default::Default for Message_ConnectionType {
fn default() -> Self {
Message_ConnectionType::NOT_CONNECTED
}
}
impl ::protobuf::reflect::ProtobufValue for Message_ConnectionType {
fn as_ref(&self) -> ::protobuf::reflect::ProtobufValueRef {
::protobuf::reflect::ProtobufValueRef::Enum(self.descriptor())

View File

@ -1,9 +1,9 @@
// This file is generated by rust-protobuf 2.0.2. Do not edit
// This file is generated by rust-protobuf 2.3.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)]
@ -30,8 +30,8 @@ pub struct Record {
signature: ::protobuf::SingularField<::std::vec::Vec<u8>>,
timeReceived: ::protobuf::SingularField<::std::string::String>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Record {