Explorar el Código

Fix deprecation warnings of protoc_rust

Use `protoc_rust::Codegen` instead of `protoc_rust::run`.
Johannes Hofmann hace 5 años
padre
commit
d3170b4c46
Se han modificado 1 ficheros con 5 adiciones y 8 borrados
  1. 5
    8
      build_proto.rs

+ 5
- 8
build_proto.rs Ver fichero

@@ -14,12 +14,9 @@ fn main() {
14 14
         println!("cargo:rerun-if-changed={}", path);
15 15
     }
16 16
 
17
-    protoc_rust::run(protoc_rust::Args {
18
-        out_dir: "src/proto",
19
-        input: &proto_files,
20
-        customize: protoc_rust::Customize {
21
-            ..Default::default()
22
-        },
23
-        includes: &[],
24
-    }).expect("protoc");
17
+    protoc_rust::Codegen::new()
18
+        .out_dir("src/proto")
19
+        .inputs(&proto_files)
20
+        .run()
21
+        .expect("Running protoc failed.");
25 22
 }