tsk-45: Code formatting
Some checks failed
Rust Build / Check (pull_request) Successful in 38s
Rust Build / Test Suite (pull_request) Successful in 37s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Clippy (pull_request) Failing after 37s
Rust Build / build (pull_request) Successful in 43s
Some checks failed
Rust Build / Check (pull_request) Successful in 38s
Rust Build / Test Suite (pull_request) Successful in 37s
Rust Build / Rustfmt (pull_request) Successful in 29s
Rust Build / Clippy (pull_request) Failing after 37s
Rust Build / build (pull_request) Successful in 43s
This commit is contained in:
@@ -3,25 +3,20 @@ pub struct App {
|
||||
pub uri: String,
|
||||
pub auth_uri: String,
|
||||
pub token: icarus_models::login_result::LoginResult,
|
||||
pub root_directory: String
|
||||
pub root_directory: String,
|
||||
}
|
||||
|
||||
impl App {
|
||||
pub fn does_root_directory_exists(&self) -> bool {
|
||||
let path = std::path::Path::new(&self.root_directory);
|
||||
if path.exists() {
|
||||
if path.is_dir() {
|
||||
true
|
||||
} else {
|
||||
false
|
||||
}
|
||||
if path.is_dir() { true } else { false }
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pub async fn initialize_app_config() -> App {
|
||||
App {
|
||||
uri: icarus_envy::environment::get_icarus_base_api_url()
|
||||
|
||||
@@ -31,9 +31,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
}
|
||||
|
||||
app.token = match auth::get_token(&app).await {
|
||||
Ok(login_result) => {
|
||||
login_result
|
||||
}
|
||||
Ok(login_result) => login_result,
|
||||
Err(err) => {
|
||||
eprintln!("Error: {err:?}");
|
||||
std::process::exit(-1);
|
||||
|
||||
Reference in New Issue
Block a user