Skip to content

Commit 3b3c987

Browse files
authored
fix: remove unreachable code path causing warning (#718)
Remove the unreachable code path that was causing the following warning to be shown each time the test suite was run in a project that uses ash_sql under elixir 1.20.0-rc.3-otp-28 warning: the following clause cannot match because the previous clauses already matched all possible values: version -> it attempts to match on the result of: System.get_env("ASH_VERSION") which has the already matched type: dynamic(nil or binary()) where "version" was given the type: # type: dynamic(nil or binary()) # from: mix.exs:114:7 version type warning found at: │ 114 │ version -> │ ~ │ └─ mix.exs:114:15: AshSql.MixProject.ash_version/1
1 parent 045da4f commit 3b3c987

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

mix.exs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,8 @@ defmodule AshPostgres.MixProject do
222222
"main" ->
223223
[git: "https://github.com/ash-project/ash.git", override: true]
224224

225-
version when is_binary(version) ->
226-
"~> #{version}"
227-
228225
version ->
229-
version
226+
"~> #{version}"
230227
end
231228
end
232229

@@ -241,11 +238,8 @@ defmodule AshPostgres.MixProject do
241238
"main" ->
242239
[git: "https://github.com/ash-project/ash_sql.git"]
243240

244-
version when is_binary(version) ->
245-
"~> #{version}"
246-
247241
version ->
248-
version
242+
"~> #{version}"
249243
end
250244
end
251245

0 commit comments

Comments
 (0)