Upgrade rust/crates/protobuf-codegen to 2.16.2
Test: make
Change-Id: I14166e5bd65e98c7c7a53cff992df72164346bc5
diff --git a/src/lib.rs b/src/lib.rs
index 1f91285..e65c1bd 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -139,10 +139,8 @@
w.pub_fn(
"file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto",
|w| {
- w.unsafe_expr(|w| {
- w.block("file_descriptor_proto_lazy.get(|| {", "})", |w| {
- w.write_line("parse_descriptor_proto()");
- });
+ w.block("file_descriptor_proto_lazy.get(|| {", "})", |w| {
+ w.write_line("parse_descriptor_proto()");
});
},
);
@@ -174,12 +172,8 @@
// Hack: hard code version number here because Android.bp
// rust modules cannot pass it though env variable yet.
- w.write_generated_by("rust-protobuf", "2.14.0");
+ w.write_generated_by("rust-protobuf", "2.16.2");
w.write_line(&format!("//! Generated file from `{}`", file.get_name()));
-
- w.write_line("");
- w.write_line("use protobuf::Message as Message_imported_for_functions;");
- w.write_line("use protobuf::ProtobufEnum as ProtobufEnum_imported_for_functions;");
if customize.inside_protobuf != Some(true) {
w.write_line("");
w.write_line("/// Generated files are compatible only with the same version");