feat: make clippy happy & update denpendencies

This commit is contained in:
2024-09-03 22:37:32 +08:00
parent 15201b92a5
commit d6c49a15ea
11 changed files with 492 additions and 384 deletions

View File

@@ -217,7 +217,7 @@ fn do_offline_init(_arg_matches: &ArgMatches<'_>, _sub_arg_matches: &ArgMatches<
}
fn read_line(prompt: &str) -> XResult<String> {
std::io::stdout().write(prompt.as_bytes()).ok();
std::io::stdout().write_all(prompt.as_bytes()).ok();
std::io::stdout().flush().ok();
let mut line = String::new();
if let Err(e) = std::io::stdin().read_line(&mut line) {
@@ -246,5 +246,5 @@ async fn do_inner_request(sub_arg_matches: &ArgMatches<'_>, action: &str, body:
let data = response_to_value(req_response).await?;
return simple_error!("Server status is not success: {}, response: {}", status, data);
}
Ok(response_to_value(req_response).await?)
response_to_value(req_response).await
}