run cargo fmt

This commit is contained in:
puck 2026-03-06 09:58:01 +00:00
parent 20fc4719f3
commit 759b9ac93d
2 changed files with 55 additions and 15 deletions

View file

@ -107,7 +107,11 @@ async fn run_auth(
}
} else {
let Some(ctx) = digid_api::wid_init(&host, &session_id).await else {
ctg_pipe.send(pipe::CardToGUI::ProcessingMessage { message: "Failed to initialize DigiD session.".to_owned() }).await;
ctg_pipe
.send(pipe::CardToGUI::ProcessingMessage {
message: "Failed to initialize DigiD session.".to_owned(),
})
.await;
return Ok(());
};
@ -514,10 +518,25 @@ fn main() {
let (gtc_pipe_s, gtc_pipe_r) = async_channel::unbounded();
let s = args().nth(1).unwrap();
let mut parsed_url = url::form_urlencoded::parse(s.split(':').last().unwrap().as_bytes()).into_owned().collect::<HashMap<String, String>>();
let mut parsed_url = url::form_urlencoded::parse(s.split(':').last().unwrap().as_bytes())
.into_owned()
.collect::<HashMap<String, String>>();
let rt = Runtime::new().unwrap();
rt.spawn(async move { run_auth(parsed_url.remove("host").unwrap_or_else(|| String::from("test")), parsed_url.remove("app_session_id").unwrap_or_else(|| String::from("test")), ctg_pipe_s, gtc_pipe_r).await.unwrap() });
rt.spawn(async move {
run_auth(
parsed_url
.remove("host")
.unwrap_or_else(|| String::from("test")),
parsed_url
.remove("app_session_id")
.unwrap_or_else(|| String::from("test")),
ctg_pipe_s,
gtc_pipe_r,
)
.await
.unwrap()
});
gui::run_gui(ctg_pipe_r, gtc_pipe_s);
}