File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2323 * [ Enum] Receiving the index of iteration in ` Enum.map/2 ` and ` Enum.each/2 ` is deprecated in favor of ` Stream.with_index/1 `
2424 * [ File] ` File.iterator/1 ` and ` File.biniterator/1 ` are deprecated in favor of ` IO.stream/1 ` and ` IO.binstream/1 `
2525 * [ File] ` File.iterator!/2 ` and ` File.biniterator!/2 ` are deprecated in favor of ` File.stream!/2 ` and ` File.binstream!/2 `
26+ * [ Record] ` Record.__index__/2 ` deprecated in favor of ` Record.__record__(:index, key) `
2627
2728* backwards incompatible changes
2829 * [ Kernel] The ` Binary.Inspect ` protocol has been renamed to ` Inspect `
Original file line number Diff line number Diff line change @@ -1517,12 +1517,12 @@ defmodule Kernel do
15171517 #=> [name: nil, age: 0]
15181518
15191519 In order to quickly access the index of a field, one can use
1520- the `__index__ ` function:
1520+ the `__record__ ` function with `:index` as the first argument :
15211521
1522- User.__index__( :age)
1522+ User.__record__(:index, :age)
15231523 #=> 2
15241524
1525- User.__index__( :unknown)
1525+ User.__record__(:index, :unknown)
15261526 #=> nil
15271527
15281528 ## Compile-time introspection
You can’t perform that action at this time.
0 commit comments