Replace dirty unwrap() with expect("TODO")

This makes it obvious where better error handling is still needed.
This commit is contained in:
Rahix 2025-12-09 15:29:21 +01:00
parent 983ceb2076
commit b66e8c8d9c
5 changed files with 25 additions and 15 deletions

View file

@ -60,12 +60,12 @@ async fn run() -> anyhow::Result<()> {
"{}/{}",
meta.issue.repository.owner, meta.issue.repository.name
))
.unwrap();
.expect("TODO");
let repo_auth_url = token.as_ref().map(|token| {
let mut repo_auth_url = repo_url.clone();
repo_auth_url.set_username("forgejo-actions").unwrap();
repo_auth_url.set_password(Some(&token)).unwrap();
repo_auth_url.set_username("forgejo-actions").expect("TODO");
repo_auth_url.set_password(Some(&token)).expect("TODO");
repo_auth_url
});
@ -138,7 +138,7 @@ async fn run() -> anyhow::Result<()> {
}
'issues: for issue in tree.iter_issues() {
let subtree = tree.subtree_for_issue(issue).unwrap();
let subtree = tree.subtree_for_issue(issue).expect("TODO");
let hash = subtree.stable_hash();
let (bot_comment, _is_new) = issue::find_or_make_bot_comment(&ctx, issue)