edgurgel / httparrot

HTTP Request & Response Server. An incomplete clone of http://httpbin.org
https://httparrot.onrender.com/
MIT License
86 stars 27 forks source link

Remove unsafe variable warning #18

Closed optikfluffel closed 8 years ago

optikfluffel commented 8 years ago

Rebased from #17 I took a shot at getting rid of that unsafe variable warning from Elixir 1.3.

warning: the variable "req" 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/httparrot.ex:66
optikfluffel commented 8 years ago

Whoops, that already in there 😅😂

bratsche commented 8 years ago

Oh yeah, sorry.. I decided to submit them as separate PRs to be on the safe side. Thanks :)