Skip to content

Commit 87317f3

Browse files
jxubwojtekmach
authored andcommitted
Coding style improvements (#5)
1 parent 712336b commit 87317f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/oop.ex

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ defmodule OOP.Registry do
44
end
55

66
def register(pid, class) do
7-
Agent.update(__MODULE__, fn map -> Map.put(map, pid, class) end)
7+
Agent.update(__MODULE__, &Map.put(&1, pid, class))
88
end
99

1010
def get(pid) do
11-
Agent.get(__MODULE__, fn map -> Map.get(map, pid, nil) end)
11+
Agent.get(__MODULE__, &Map.get(&1, pid, nil))
1212
end
1313
end
1414

0 commit comments

Comments
 (0)