diff --git a/zcash_client_backend/build.rs b/zcash_client_backend/build.rs index 335848d44..ae7db927f 100644 --- a/zcash_client_backend/build.rs +++ b/zcash_client_backend/build.rs @@ -38,45 +38,43 @@ fn build() -> io::Result<()> { "src/proto/compact_formats.rs", )?; - { - // Build the gRPC types and client. - tonic_build::configure() - .build_server(false) - .client_mod_attribute( - "cash.z.wallet.sdk.rpc", - r#"#[cfg(feature = "lightwalletd-tonic")]"#, - ) - .extern_path( - ".cash.z.wallet.sdk.rpc.ChainMetadata", - "crate::proto::compact_formats::ChainMetadata", - ) - .extern_path( - ".cash.z.wallet.sdk.rpc.CompactBlock", - "crate::proto::compact_formats::CompactBlock", - ) - .extern_path( - ".cash.z.wallet.sdk.rpc.CompactTx", - "crate::proto::compact_formats::CompactTx", - ) - .extern_path( - ".cash.z.wallet.sdk.rpc.CompactSaplingSpend", - "crate::proto::compact_formats::CompactSaplingSpend", - ) - .extern_path( - ".cash.z.wallet.sdk.rpc.CompactSaplingOutput", - "crate::proto::compact_formats::CompactSaplingOutput", - ) - .extern_path( - ".cash.z.wallet.sdk.rpc.CompactOrchardAction", - "crate::proto::compact_formats::CompactOrchardAction", - ) - .compile(&[SERVICE_PROTO], &["proto/"])?; + // Build the gRPC types and client. + tonic_build::configure() + .build_server(false) + .client_mod_attribute( + "cash.z.wallet.sdk.rpc", + r#"#[cfg(feature = "lightwalletd-tonic")]"#, + ) + .extern_path( + ".cash.z.wallet.sdk.rpc.ChainMetadata", + "crate::proto::compact_formats::ChainMetadata", + ) + .extern_path( + ".cash.z.wallet.sdk.rpc.CompactBlock", + "crate::proto::compact_formats::CompactBlock", + ) + .extern_path( + ".cash.z.wallet.sdk.rpc.CompactTx", + "crate::proto::compact_formats::CompactTx", + ) + .extern_path( + ".cash.z.wallet.sdk.rpc.CompactSaplingSpend", + "crate::proto::compact_formats::CompactSaplingSpend", + ) + .extern_path( + ".cash.z.wallet.sdk.rpc.CompactSaplingOutput", + "crate::proto::compact_formats::CompactSaplingOutput", + ) + .extern_path( + ".cash.z.wallet.sdk.rpc.CompactOrchardAction", + "crate::proto::compact_formats::CompactOrchardAction", + ) + .compile(&[SERVICE_PROTO], &["proto/"])?; - // Copy the generated types into the source tree so changes can be committed. The - // file has the same name as for the compact format types because they have the - // same package, but we've set things up so this only contains the service types. - fs::copy(out.join("cash.z.wallet.sdk.rpc.rs"), "src/proto/service.rs")?; - } + // Copy the generated types into the source tree so changes can be committed. The + // file has the same name as for the compact format types because they have the + // same package, but we've set things up so this only contains the service types. + fs::copy(out.join("cash.z.wallet.sdk.rpc.rs"), "src/proto/service.rs")?; Ok(()) }