Merge pull request #168 from Feng94/protos-build-dir-separator-fix

Fix hardcoded string to use system constant for directory separator
This commit is contained in:
Paul Hauner 2019-02-01 12:09:27 +11:00 committed by GitHub
commit c1c5311ea0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,10 @@
extern crate protoc_grpcio;
use std::path::Path;
fn main() {
let proto_root = "src/";
println!("cargo:rerun-if-changed={}", proto_root);
let proto_root = Path::new("src");
println!("cargo:rerun-if-changed={}", proto_root.display());
protoc_grpcio::compile_grpc_protos(&["services.proto"], &[proto_root], &proto_root)
.expect("Failed to compile gRPC definitions!");
}