Skip to content
This repository has been archived by the owner on Oct 2, 2020. It is now read-only.

Commit

Permalink
Fix #76 by adding with-open in two places.
Browse files Browse the repository at this point in the history
  • Loading branch information
seancorfield committed Mar 28, 2014
1 parent 35897bc commit 59c77c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions src/slam/hound.clj
Expand Up @@ -10,10 +10,11 @@
;; Reconstructing consists of three distinct phases:
;; asploding, regrowing, and stitching.
(with-regrow-cache
(-> (io/reader filename)
asplode
regrow
stitch-up)))
(with-open [rdr (io/reader filename)]
(-> rdr
asplode
regrow
stitch-up))))

(defn- read-comment-header
"Read leading blank and comment lines from rdr."
Expand Down
3 changes: 2 additions & 1 deletion src/slam/hound/search.clj
Expand Up @@ -43,7 +43,8 @@

(defn find-ns-form [^File f]
(when (and (.isFile f) (clj? (.getName f)))
(read-ns-form (PushbackReader. (reader f)) f)))
(with-open [rdr (reader f)]
(read-ns-form (PushbackReader. rdr) f))))

(defn namespaces-in-dir [dir]
(sort (for [f (file-seq (file dir))
Expand Down

0 comments on commit 59c77c1

Please sign in to comment.