Use unwrap_or_default() instead of unwrap_or("")

This commit is contained in:
Kitaiti Makoto 2023-03-21 18:49:01 +09:00
parent 33bd290679
commit d6bb2bfb72

View file

@ -15,10 +15,9 @@
(&uri!(instance::admin_email_blocklist: page=_).to_string(), i18n!(ctx.1, "Email blocklist"), false)
])
<form method="get" action="@uri!(instance::admin_search_users: page = _, user = user.unwrap_or(""))">
<form method="get" action="@uri!(instance::admin_search_users: page = _, user = user.unwrap_or_default())">
<header>
<input type="search" name="user" value="@user.unwrap_or("")">
<input type="hidden" name="page" value="@page">
<input type="search" name="user" value="@user.unwrap_or_default()">
<input type="submit" value="@i18n!(ctx.1, "Search users")">
</header>
</form>