Skip to content

Commit 73a1ab6

Browse files
whatyouhidejosevalim
authored andcommitted
Run the code formatter on ExUnit.Server (#6652)
1 parent bb26227 commit 73a1ab6

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/ex_unit/lib/ex_unit/server.ex

+10-8
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,14 @@ defmodule ExUnit.Server do
3333
## Callbacks
3434

3535
def init(:ok) do
36-
{:ok, %{
37-
loaded: System.monotonic_time,
36+
state = %{
37+
loaded: System.monotonic_time(),
3838
waiting: nil,
3939
async_modules: [],
40-
sync_modules: [],
41-
}}
40+
sync_modules: []
41+
}
42+
43+
{:ok, state}
4244
end
4345

4446
# Called on demand until we are signaled all modules are loaded.
@@ -47,13 +49,13 @@ defmodule ExUnit.Server do
4749
end
4850

4951
# Called once after all async modules have been sent and reverts the state.
50-
def handle_call(:take_sync_modules, _from, %{waiting: nil, loaded: :done, async_modules: []} = state) do
51-
{:reply, state.sync_modules,
52-
%{state | sync_modules: [], loaded: System.monotonic_time}}
52+
def handle_call(:take_sync_modules, from, state) do
53+
%{waiting: nil, loaded: :done, async_modules: []} = state
54+
{:reply, state.sync_modules, %{state | sync_modules: [], loaded: System.monotonic_time()}}
5355
end
5456

5557
def handle_call(:modules_loaded, _from, %{loaded: loaded} = state) when is_integer(loaded) do
56-
diff = System.convert_time_unit(System.monotonic_time - loaded, :native, :microsecond)
58+
diff = System.convert_time_unit(System.monotonic_time() - loaded, :native, :microsecond)
5759
{:reply, diff, take_modules(%{state | loaded: :done})}
5860
end
5961

0 commit comments

Comments
 (0)