diff options
| author | eltrac <hi@eltr.ac> | 2026-03-05 16:52:48 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-03-05 16:52:48 +0800 |
| commit | 2481a1770f5ea0882795ca87bf8a3752fbf47b7c (patch) | |
| tree | bee1d4700d1798258fa6d1a8c8ac79e819e5a8b8 /src | |
| parent | 48dff54f4c1fa309d7cf34d96509df12f52576b3 (diff) | |
style(processor): simplify code with when-let
Diffstat (limited to 'src')
| -rw-r--r-- | src/weepinbell/processor.clj | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/weepinbell/processor.clj b/src/weepinbell/processor.clj index 95476b3..42e973f 100644 --- a/src/weepinbell/processor.clj +++ b/src/weepinbell/processor.clj @@ -48,13 +48,12 @@ [wmc] (println "Processor started.") (go-loop [] - (let [wm (<! wmc)] + (when-let [wm (<! wmc)] (println "Webmention found in queue.") - (if wm - (let [{:keys [s t]} wm] - (if (verify-mention s t) - (process-verified-webmention s t) - (println "Invalid mention"))) - (println "Idling"))) + (let [{:keys [s t]} wm] + (if (verify-mention s t) + (process-verified-webmention s t) + (println "Invalid mention"))) + (println "Idling")) (recur))) |
