From 3a91c87c73a584ef5ac21a5b61779433a82950b2 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sat, 28 Mar 2020 03:16:07 +0300 Subject: [PATCH] clippy: use as_deref() --- src/chat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index ffce31db3..fd90d2c7d 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -324,7 +324,7 @@ impl ChatId { time(), msg.viewtype, MessageState::OutDraft, - msg.text.as_ref().map(String::as_str).unwrap_or(""), + msg.text.as_deref().unwrap_or(""), msg.param.to_string(), 1, ],