this repo has no description
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove remaining struct update usage for 1.19

garrison 9cc38e09 be1a1f75

+15 -15
+1 -1
lib/construct/scheduler.ex
··· 485 485 486 486 log(state, {:spawn, child_pid, {spawn.module, spawn.function, spawn.args}}) 487 487 488 - parent_resume = %Resume{spawn.parent_resume | value: child_pid} 488 + parent_resume = %{%Resume{} = spawn.parent_resume | value: child_pid} 489 489 490 490 state 491 491 |> set_current_process(child_pid)
+3 -3
lib/construct/sim_log.ex
··· 40 40 }} 41 41 end 42 42 43 - def handle_call(:get_log, _from, state) do 43 + def handle_call(:get_log, _from, %State{} = state) do 44 44 response = %{ 45 45 num_events: state.num_events, 46 46 rolling_hash: state.rolling_hash, ··· 50 50 {:reply, response, state} 51 51 end 52 52 53 - def handle_cast({:log, event}, state) do 53 + def handle_cast({:log, event}, %State{} = state) do 54 54 {known, event} = homogenize(state.known, event) 55 55 56 - state = %State{state | 56 + state = %{state | 57 57 num_events: state.num_events + 1, 58 58 rolling_hash: :erlang.phash2({state.rolling_hash, event}), 59 59 known: known,
+3 -3
lib/servers/resolver.ex
··· 62 62 {:ok, state} 63 63 end 64 64 65 - def handle_call({:resolve_batch, %ResolveBatch{} = batch}, from, state) do 66 - state = %State{state | buffer: Map.put_new(state.buffer, batch.prev_commit_version, {from, batch})} 65 + def handle_call({:resolve_batch, %ResolveBatch{} = batch}, from, %State{} = state) do 66 + state = %{state | buffer: Map.put_new(state.buffer, batch.prev_commit_version, {from, batch})} 67 67 {:noreply, maybe_resolve_next(state)} 68 68 end 69 69 70 - def handle_info(:clear_old, state) do 70 + def handle_info(:clear_old, %State{} = state) do 71 71 VersionMap.clear_old(state.version_map, max(state.version - @mvcc_window, 0)) 72 72 SimServer.send_after(self(), :clear_old, @clear_every_ms) 73 73 {:noreply, state}
+2 -2
lib/workloads/cycle.ex
··· 50 50 }} 51 51 end 52 52 53 - def handle_call(:stop, _from, state) do 53 + def handle_call(:stop, _from, %State{} = state) do 54 54 { 55 55 :reply, 56 56 Map.take(state, [:stats, :commit_latencies]), 57 - %State{state | stopped: true}, 57 + %{state | stopped: true}, 58 58 } 59 59 end 60 60
+2 -2
lib/workloads/read_write.ex
··· 63 63 }} 64 64 end 65 65 66 - def handle_call(:stop, _from, state) do 67 - {:reply, state.stats, %State{state | stopped: true}} 66 + def handle_call(:stop, _from, %State{} = state) do 67 + {:reply, state.stats, %{state | stopped: true}} 68 68 end 69 69 70 70 def handle_info(:tick, %State{stopped: true} = state), do: {:noreply, state}
+2 -2
lib/workloads/shard_move.ex
··· 35 35 {:ok, %State{cluster: cluster}} 36 36 end 37 37 38 - def handle_call(:stop, _from, state) do 39 - {:reply, :ok, %State{state | stopped: true}} 38 + def handle_call(:stop, _from, %State{} = state) do 39 + {:reply, :ok, %{state | stopped: true}} 40 40 end 41 41 42 42 def handle_info(:tick, %State{stopped: true} = state), do: {:noreply, state}
+2 -2
test/test_helper.exs
··· 9 9 defp set_inspect_defaults do 10 10 prev_fun = Inspect.Opts.default_inspect_fun() 11 11 12 - Inspect.Opts.default_inspect_fun(fn value, opts -> 13 - opts = %Inspect.Opts{opts | binaries: :as_strings, charlists: :as_lists} 12 + Inspect.Opts.default_inspect_fun(fn value, %Inspect.Opts{} = opts -> 13 + opts = %{opts | binaries: :as_strings, charlists: :as_lists} 14 14 prev_fun.(value, opts) 15 15 end) 16 16 end