chore(examples): Remove relative path from reading data (#1220)
This commit is contained in:
@@ -7,7 +7,8 @@ use tonic::transport::{Certificate, Channel, ClientTlsConfig};
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let pem = std::fs::read_to_string("examples/data/tls/ca.pem")?;
|
||||
let data_dir = std::path::PathBuf::from_iter([std::env!("CARGO_MANIFEST_DIR"), "data"]);
|
||||
let pem = std::fs::read_to_string(data_dir.join("tls/ca.pem"))?;
|
||||
let ca = Certificate::from_pem(pem);
|
||||
|
||||
let tls = ClientTlsConfig::new()
|
||||
|
||||
Reference in New Issue
Block a user