mirror of
https://github.com/mii443/vrchatapi-rust.git
synced 2025-08-23 08:05:37 +00:00
Actually forward the error to the test executor
This commit is contained in:
@ -27,14 +27,7 @@ enum Error{
|
|||||||
|
|
||||||
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() {
|
async fn main() -> Result<(), anyhow::Error> {
|
||||||
println!("Hello");
|
|
||||||
match test().await {
|
|
||||||
Ok(()) => {}
|
|
||||||
Err(e) => eprint!("{e}")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
async fn test() -> Result<(), anyhow::Error>{
|
|
||||||
dotenv::dotenv().map_err(|e|Error::DotenvInitError(e))?;
|
dotenv::dotenv().map_err(|e|Error::DotenvInitError(e))?;
|
||||||
let username = dotenv::var("USERNAME").map_err(|e|Error::NoUsername(e))?;
|
let username = dotenv::var("USERNAME").map_err(|e|Error::NoUsername(e))?;
|
||||||
let password = dotenv::var("PASSWORD").map_err(|e|Error::NoPassword(e))?;
|
let password = dotenv::var("PASSWORD").map_err(|e|Error::NoPassword(e))?;
|
||||||
|
Reference in New Issue
Block a user