From c4de0f3b17571bca78d238750b9d91cef9cda5b4 Mon Sep 17 00:00:00 2001 From: jikstra Date: Thu, 5 Dec 2019 14:03:17 +0100 Subject: [PATCH] Apply remaining requested changes --- src/chat.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/chat.rs b/src/chat.rs index 43831ed72..8d92a6325 100644 --- a/src/chat.rs +++ b/src/chat.rs @@ -1929,7 +1929,7 @@ pub fn get_info_json(context: &Context, chat_id: u32) -> Result { let draft = match get_draft(context, chat_id) { Ok(message) => match message { - Some(m) => m.text.unwrap_or("".to_string()), + Some(m) => m.text.unwrap_or_else(|| "".to_string()), None => "".to_string(), }, Err(_) => "".to_string(),