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

@@ -17,7 +17,7 @@ libp2p-core = { version = "0.2.0", path = "../../core" }
log = "0.4.1"
multiaddr = { package = "parity-multiaddr", version = "0.1.0", path = "../../misc/multiaddr" }
parking_lot = "0.7"
protobuf = "2.0.2"
protobuf = "2.3"
smallvec = "0.6"
tokio-codec = "0.1"
tokio-io = "0.1.0"

View File

@@ -5,7 +5,7 @@
sudo docker run --rm -v `pwd`:/usr/code:z -w /usr/code rust /bin/bash -c " \
apt-get update; \
apt-get install -y protobuf-compiler; \
cargo install --version 2.0.2 protobuf-codegen; \
cargo install --version 2.3.0 protobuf-codegen; \
protoc --rust_out . structs.proto"
sudo chown $USER:$USER *.rs

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 Identify {
observedAddr: ::protobuf::SingularField<::std::vec::Vec<u8>>,
protocols: ::protobuf::RepeatedField<::std::string::String>,
// special fields
unknown_fields: ::protobuf::UnknownFields,
cached_size: ::protobuf::CachedSize,
pub unknown_fields: ::protobuf::UnknownFields,
pub cached_size: ::protobuf::CachedSize,
}
impl Identify {