Changed std::env::var(

This commit is contained in:
Luke Else 2023-05-22 12:48:34 +01:00
parent 40098478b9
commit 5b8e7de9f1

View File

@ -13,8 +13,8 @@ async fn main() {
client_options.app_name = Some("My App".to_string());
let credential_builder = Credential::builder()
.username(Some(std::env::var("mongo_username").unwrap()))
.password(Some(std::env::var("mongo_password").unwrap()));
.username(String::from(env!("mongo_username")))
.password(String::from(env!("mongo_password")));
client_options.credential = Some(credential_builder.build());