fix(transport): Update builders to move self (#132)

This commit is contained in:
Juan Alvarez
2019-11-11 15:27:40 +01:00
committed by Lucio Franco
parent 4490812ab4
commit 85ef18f8b7
9 changed files with 144 additions and 112 deletions
+2 -3
View File
@@ -29,14 +29,13 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
let tls_config = ClientTlsConfig::with_rustls()
.ca_certificate(Certificate::from_pem(certs.as_slice()))
.domain_name("pubsub.googleapis.com")
.clone();
.domain_name("pubsub.googleapis.com");
let channel = Channel::from_static(ENDPOINT)
.intercept_headers(move |headers| {
headers.insert("authorization", header_value.clone());
})
.tls_config(&tls_config)
.tls_config(tls_config)
.connect()
.await?;