Fix warnings (#1077)

This commit is contained in:
Wojtek Mach 2022-03-30 13:33:49 +02:00 committed by GitHub
parent 241ee94cba
commit c5152eb941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 8 deletions

View file

@ -570,9 +570,12 @@ defmodule Livebook.Runtime.ErlDist.RuntimeServer do
defp scan_binding_after_evaluation(state, locator) do
update_in(state.smart_cells, fn smart_cells ->
Map.map(smart_cells, fn
{ref, %{base_locator: ^locator} = info} -> scan_binding_async(ref, info, state)
{_, info} -> info
Map.new(smart_cells, fn
{ref, %{base_locator: ^locator} = info} ->
{ref, scan_binding_async(ref, info, state)}
other ->
other
end)
end)
end

View file

@ -1319,8 +1319,8 @@ defmodule Livebook.Session.Data do
%{sources: _} = info ->
update_in(
info.sources,
&Map.map(&1, fn {_, source_info} ->
put_in(source_info.revision_by_client_pid[client_pid], source_info.revision)
&Map.new(&1, fn {key, source_info} ->
{key, put_in(source_info.revision_by_client_pid[client_pid], source_info.revision)}
end)
)
@ -1345,9 +1345,9 @@ defmodule Livebook.Session.Data do
%{sources: _} = info ->
update_in(
info.sources,
&Map.map(&1, fn {_, source_info} ->
&Map.new(&1, fn {key, source_info} ->
{_, source_info} = pop_in(source_info.revision_by_client_pid[client_pid])
purge_deltas(source_info)
{key, purge_deltas(source_info)}
end)
)

View file

@ -51,7 +51,7 @@ defmodule LivebookWeb.SessionLive.BinComponent do
<% end %>
</div>
<%= cond do %>
<%= @bin_entries == [] -> %>
<% @bin_entries == [] -> %>
<div class="p-5 py-24 flex flex-col gap-3 space-x-4 items-center">
<div>
<.remix_icon icon="delete-bin-6-line" class="text-gray-700 text-xl bg-gray-100 p-3 rounded-full" />