Skip to content

Commit

Permalink
Fix clippy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
AgustinSRG committed Dec 24, 2023
1 parent 8767fc8 commit d8fc61d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/commands/media_import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ pub async fn run_cmd_import_media(

let original_file_path: String = match import_metadata.original {
Some(original_file) => std::path::Path::new(&path)
.join(&original_file)
.join(original_file)
.to_str()
.unwrap()
.to_string(),
Expand Down
34 changes: 15 additions & 19 deletions src/commands/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,7 @@ pub async fn run_cmd_monitor_tasks(global_opts: CommandGlobalOptions) {
} => {
if status == StatusCode::UNAUTHORIZED && monitoring_started {
if logout_after_operation {
do_logout(&global_opts, &vault_url)
.await
.unwrap_or(());
do_logout(&global_opts, &vault_url).await.unwrap_or(());
}
process::exit(0);
} else {
Expand Down Expand Up @@ -430,27 +428,25 @@ pub fn spawn_termination_thread(
task::spawn(async move {
let mut stdin = io::stdin();

loop {
let r = stdin.read_u8().await;
let r = stdin.read_u8().await;

match r {
Ok(_) => {
if logout_after_operation {
let logout_res = do_logout(&global_opts, &vault_url).await;
match r {
Ok(_) => {
if logout_after_operation {
let logout_res = do_logout(&global_opts, &vault_url).await;

match logout_res {
Ok(_) => {}
Err(_) => {
process::exit(1);
}
match logout_res {
Ok(_) => {}
Err(_) => {
process::exit(1);
}
}

process::exit(0);
}
Err(_) => {
process::exit(1);
}

process::exit(0);
}
Err(_) => {
process::exit(1);
}
}
});
Expand Down

0 comments on commit d8fc61d

Please sign in to comment.