mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-01 05:32:19 +00:00
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
14 lines
398 B
Bash
Executable File
14 lines
398 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# This script regenerates the `src/structs_proto.rs` file from `structs.proto`.
|
|
|
|
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.3.0 protobuf-codegen; \
|
|
protoc --rust_out . structs.proto"
|
|
|
|
sudo chown $USER:$USER *.rs
|
|
|
|
mv -f structs.rs ./src/structs_proto.rs
|