Skip to content

Commit

Permalink
Use Kino.Render.Any.to_livebook/1 (livebook-dev#491)
Browse files Browse the repository at this point in the history
  • Loading branch information
josevalim authored and Adrian Ibañez committed Feb 27, 2025
1 parent cee36af commit 05ea3c9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/kino/render.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ end

defimpl Kino.Render, for: Kino.Inspect do
def to_livebook(raw) do
Kino.Output.inspect(raw.term)
Kino.Render.Any.to_livebook(raw.term)
end
end

Expand Down Expand Up @@ -164,7 +164,7 @@ defimpl Kino.Render, for: Reference do
reference |> Kino.ETS.new() |> Kino.Render.to_livebook()

true ->
Kino.Output.inspect(reference)
Kino.Render.Any.to_livebook(reference)
end
end

Expand Down Expand Up @@ -198,7 +198,7 @@ defimpl Kino.Render, for: Atom do
Kino.Render.to_livebook(tabs)

true ->
Kino.Output.inspect(atom)
Kino.Render.Any.to_livebook(atom)
end
end

Expand All @@ -220,7 +220,7 @@ defimpl Kino.Render, for: PID do
Kino.Render.to_livebook(tabs)

true ->
Kino.Output.inspect(pid)
Kino.Render.Any.to_livebook(pid)
end
end
end
Expand All @@ -229,7 +229,7 @@ defimpl Kino.Render, for: BitString do
def to_livebook(string) do
case Kino.Utils.get_image_type(string) do
nil ->
Kino.Output.inspect(string)
Kino.Render.Any.to_livebook(string)

type ->
raw = Kino.Inspect.new(string)
Expand Down

0 comments on commit 05ea3c9

Please sign in to comment.