• @ugo@feddit.it
    link
    fedilink
    137 months ago

    If this was cpp, clang-tidy would tell you “do not use else after return”

    I don’t know how null works in swift, but assuming it coerces to bool I’d write

    if (a) return a;
    return b;