Skip to content

Commit

Permalink
Remove do binding in let form
Browse files Browse the repository at this point in the history
do binding in let form is not neccessary as let provides an implicit do
form.
  • Loading branch information
Bjarte Johansen committed Sep 20, 2012
1 parent b085c01 commit 24ff7fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/kibit/rules/control_structures.clj
Expand Up @@ -18,7 +18,7 @@
;; suggest `while` for bindingless loop-recur
[(loop [] (when ?test . ?exprs (recur)))
(while ?test . ?exprs)]
)
[(let ?binding (do . ?exprs)) (let ?binding . ?exprs)])

(comment
(when (not (pred? x y)) (f x y))
Expand Down
3 changes: 2 additions & 1 deletion test/kibit/test/control_structures.clj
Expand Up @@ -16,4 +16,5 @@
'single-expression '(do single-expression)
'_ '(when-not true anything)
'_ '(when false anything)
'(when-let [a test] expr) '(if-let [a test] expr nil)))
'(when-let [a test] expr) '(if-let [a test] expr nil)
'(let [a 1] (println a) a) '(let [a 1] (do (println a) a))))

0 comments on commit 24ff7fd

Please sign in to comment.