Skip to content

Commit a7832db

Browse files
committed
chore: Address Credo issue about with clause being redundant
If the return value of the last `with` check is what's being returned, it doesn't need to be part of the `with` clause - it can be part of the `with` body
1 parent 273ea62 commit a7832db

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/mix/tasks/ash_postgres.install.ex

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -338,10 +338,8 @@ if Code.ensure_loaded?(Igniter) do
338338
[AshPostgres.Timestamptz, AshPostgres.TimestamptzUsec],
339339
updater: fn zipper ->
340340
with {:ok, zipper} <-
341-
Igniter.Code.List.prepend_new_to_list(zipper, AshPostgres.Timestamptz),
342-
{:ok, zipper} <-
343-
Igniter.Code.List.prepend_new_to_list(zipper, AshPostgres.TimestamptzUsec) do
344-
{:ok, zipper}
341+
Igniter.Code.List.prepend_new_to_list(zipper, AshPostgres.Timestamptz) do
342+
Igniter.Code.List.prepend_new_to_list(zipper, AshPostgres.TimestamptzUsec)
345343
end
346344
end
347345
)

0 commit comments

Comments
 (0)