Reduce number of generic impl AsRef

This commit is contained in:
link2xt
2022-05-07 17:37:39 +00:00
parent 60d3960f3a
commit 5a85255be9
4 changed files with 17 additions and 22 deletions

View File

@@ -150,8 +150,7 @@ impl LoginParam {
}
/// Read the login parameters from the database.
async fn from_database(context: &Context, prefix: impl AsRef<str>) -> Result<Self> {
let prefix = prefix.as_ref();
async fn from_database(context: &Context, prefix: &str) -> Result<Self> {
let sql = &context.sql;
let key = format!("{}addr", prefix);