mirror: simplify repo lookup with ? and explicit exists check
https://claude.ai/code/session_01MtUMXi7Z3GCDWQFY8puWpu
change
commit 0da0d6aa5b22e22c7efed33441ebbbe0abf6fcb4
author Claude <noreply@anthropic.com>
date
parent 3f564fce
diff --git a/quire-server/src/mirror.rs b/quire-server/src/mirror.rs
index fb17067..23837af 100644
--- a/quire-server/src/mirror.rs
+++ b/quire-server/src/mirror.rs
@@ -39,13 +39,10 @@ enum MirrorError {
 /// ref, reads `.quire/config.fnl` at the new SHA to obtain the `github.mirror`
 /// URL. Skips repos with no mirror URL configured.
 pub fn trigger(quire: &Quire, event: &PushEvent) -> miette::Result<()> {
-    let repo = match quire.repo(&event.repo) {
-        Ok(r) if r.exists() => r,
-        Ok(_) => {
-            return Err(MirrorError::RepoNotFound(event.repo.clone()).into());
-        }
-        Err(e) => return Err(e),
-    };
+    let repo = quire.repo(&event.repo)?;
+    if !repo.exists() {
+        return Err(MirrorError::RepoNotFound(event.repo.clone()).into());
+    }
 
     let config = quire.global_config().into_diagnostic()?;
     let mirror_token = config