I figured out a few days ago that I can use inner functions to make my code look more clean
//Helper function to prevent using too long function calls in multiple variables
async fn get_val(key: &str) -> Result<String, Error> {
vault_access::get_value(key)
.await
.map_err(|e|
Error::Io(Err::new(ErrorKind::Other, e.to_string()))
)
}
let db_user = get_val("DB_USER").await?;
let db_pass = get_val("DB_PASSWORD").await?;
Does this have a negative impanct on my performance?