Skip to content

Commit

Permalink
Use the new child spec instead of deprecated Supervisor.Spec.worker/2
Browse files Browse the repository at this point in the history
  • Loading branch information
mnishiguchi authored and lpil committed May 28, 2021
1 parent 275fb0d commit 0ba1e05
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions lib/mix_test_watch.ex
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,8 @@ defmodule MixTestWatch do
#

def start(_type, _args) do
import Supervisor.Spec, warn: false

children = [
worker(Watcher, [])
Watcher
]

opts = [strategy: :one_for_one, name: Sup.Supervisor]
Expand Down
2 changes: 1 addition & 1 deletion lib/mix_test_watch/watcher.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule MixTestWatch.Watcher do
# Client API
#

def start_link do
def start_link(_args) do
GenServer.start_link(__MODULE__, [], name: __MODULE__)
end

Expand Down

0 comments on commit 0ba1e05

Please sign in to comment.