Skip to content

Commit 197351d

Browse files
authored
Fix a comment typo in the Code Anti-Patterns doc page (#13219)
1 parent 0d671da commit 197351d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/elixir/pages/anti-patterns/code-anti-patterns.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ iex> Graphics.plot(point_2d)
372372
{2, 3, nil}
373373
iex> Graphics.plot(bad_point)
374374
** (KeyError) key :x not found in: %{y: 3, z: 4} # <= explicitly warns that
375-
graphic.ex:4: Graphics.plot/1 # <= the :z key does not exist!
375+
graphic.ex:4: Graphics.plot/1 # <= the :x key does not exist!
376376
```
377377

378378
Overall, the usage of `map.key` and `map[:key]` encode important information about your data structure, allowing developers to be clear about their intent. See both `Map` and `Access` module documentation for more information and examples.

0 commit comments

Comments
 (0)