AgilionApps / remix

Automatic recompilation of mix code on file change.
Other
149 stars 28 forks source link

Remove compilation warning about unsafe variable #10

Closed kek closed 8 years ago

kek commented 8 years ago

Removes compilation warning when using Elixir 1.3:

~/remix $ mix test
Compiling 1 file (.ex)
warning: the variable "state" is unsafe as it has been set inside a case/cond/receive/if/&&/||. Please explicitly return the variable value instead. For example:

    case int do
      1 -> atom = :one
      2 -> atom = :two
    end

should be written as

    atom =
      case int do
        1 -> :one
        2 -> :two
      end

Unsafe variable found at:
  lib/remix.ex:54

Generated remix app
.

Finished in 0.01 seconds
1 test, 0 failures

Randomized with seed 887889
alanpeabody commented 8 years ago

Thanks!