Various typespec and compilation improvements

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-09-10 11:27:59 +02:00
parent 029a4ea194
commit de047c8939
125 changed files with 790 additions and 357 deletions

View File

@@ -71,9 +71,6 @@ defmodule Mix.Tasks.Mobilizon.Actors.Refresh do
Actor #{preferred_username} refreshed
""")
{:actor, nil} ->
shell_error("Error: No such actor")
{:error, err} when is_binary(err) ->
shell_error(err)

View File

@@ -25,7 +25,7 @@ defmodule Mix.Tasks.Mobilizon.Actors.Utils do
end
# Profile from name
@spec username_and_name(String.t() | nil, String.t() | nil) :: String.t()
@spec username_and_name(String.t() | nil, String.t() | nil) :: {String.t(), String.t()}
def username_and_name(nil, profile_name) do
{generate_username(profile_name), profile_name}
end