We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58c4561 commit bd3b2f6Copy full SHA for bd3b2f6
lib/elixir/lib/io.ex
@@ -511,7 +511,8 @@ defmodule IO do
511
"""
512
@spec inspect(device, item, inspect_opts) :: item when item: var
513
def inspect(device, item, opts) when is_device(device) and is_list(opts) do
514
- label = if label = opts[:label], do: [to_chardata(label), ": "], else: []
+ {label, opts} = Keyword.pop(opts, :label)
515
+ label = if label, do: [to_chardata(label), ": "], else: []
516
opts = Inspect.Opts.new(opts)
517
doc = Inspect.Algebra.group(Inspect.Algebra.to_doc(item, opts))
518
chardata = Inspect.Algebra.format(doc, opts.width)
0 commit comments