Reduce number of AsRef generics

They result in compilation of duplicate code.
This commit is contained in:
link2xt
2021-12-31 13:57:45 +00:00
parent 4136217249
commit 30cb0cbcfd
14 changed files with 53 additions and 61 deletions

View File

@@ -282,7 +282,7 @@ async fn decode_openpgp(context: &Context, qr: &str) -> Result<Qr> {
chat::add_info_msg(
context,
chat.id,
format!("{} verified.", peerstate.addr),
&format!("{} verified.", peerstate.addr),
time(),
)
.await?;
@@ -424,7 +424,7 @@ pub async fn set_config_from_qr(context: &Context, qr: &str) -> Result<()> {
grpid,
..
} => {
let chat_id = get_chat_id_by_grpid(context, grpid)
let chat_id = get_chat_id_by_grpid(context, &grpid)
.await?
.map(|(chat_id, _protected, _blocked)| chat_id);
token::save(