Skip to content

Commit

Permalink
Corrects implementation of removeWatch (issue liebke#11)
Browse files Browse the repository at this point in the history
As @jafingerhut pointed out, there are two apparently incorrect uses
of swap!, one in atoms.clj and one in refs.clj. In both cases, the
error is in the removeWatch implementation. This resolves liebke#11, and
possibly issues liebke#3 and liebke#10.
  • Loading branch information
Justin Holguin committed Jun 11, 2014
1 parent d73d588 commit b196d38
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/avout/atoms.clj
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@

(getWatches [this] @watches)

(removeWatch [this key] (swap! watches (dissoc key)) this)
(removeWatch [this key] (swap! watches dissoc key) this)

(setValidator [this f] (reset! validator f))

Expand Down
2 changes: 1 addition & 1 deletion src/avout/refs.clj
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@

(getWatches [this] @watches)

(removeWatch [this key] (swap! watches (dissoc key)) this)
(removeWatch [this key] (swap! watches dissoc key) this)

(setValidator [this f] (reset! validator f))

Expand Down

0 comments on commit b196d38

Please sign in to comment.