diff --git a/src/rustint/core.clj b/src/rustint/core.clj index 502c09e..3852640 100644 --- a/src/rustint/core.clj +++ b/src/rustint/core.clj @@ -2545,13 +2545,10 @@ ) (defn replace-groups [string groups] - (if (empty? groups) - string - ( - replace-groups - (clojure.string/replace-first string #"\{:?(.\d+)?\}" (first groups)) - (rest groups) - ) + (cond + (nil? groups) string + (empty? groups) string + :else (replace-groups (clojure.string/replace-first string #"\{:?(.\d+)?\}" (first groups)) (rest groups)) ) )