Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix DF.print for :struct #840

Merged
merged 2 commits into from Jan 29, 2024

Conversation

lkarthee
Copy link
Member

@lkarthee lkarthee commented Jan 29, 2024

iex> df = DF.new([%{n: %{a: 1}, m: 2}, %{n: %{a: 2}, m: 3}]) |> DF.print()
** (Protocol.UndefinedError) protocol String.Chars not implemented for %{"a" => 2} of type Map. This protocol is implemented for the following type(s): Atom, BitString, Complex, Date, DateTime, Explorer.Duration, Float, Integer, List, NaiveDateTime, Time, URI, Version, Version.Requirement
    (elixir 1.16.0) lib/string/chars.ex:3: String.Chars.impl_for!/1
    (elixir 1.16.0) lib/string/chars.ex:22: String.Chars.to_string/1
    (table_rex 4.0.0) lib/table_rex/cell.ex:85: TableRex.Cell.to_cell/2
    (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (elixir 1.16.0) lib/enum.ex:1700: Enum."-map/2-lists^map/1-1-"/2
    (table_rex 4.0.0) lib/table_rex/table.ex:151: TableRex.Table.add_rows/2

@josevalim josevalim merged commit 8b03726 into elixir-explorer:main Jan 29, 2024
3 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@lkarthee lkarthee deleted the fix_df_print_struct branch January 29, 2024 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants