cargo fmt

This commit is contained in:
jikstra
2019-11-27 00:27:19 +01:00
committed by holger krekel
parent 594bf3dfc8
commit 36bd502292

View File

@@ -1924,17 +1924,15 @@ pub fn get_info_json(context: &Context, chat_id: u32) -> Result<String, Error> {
let profile_image = match chat.get_profile_image(context) { let profile_image = match chat.get_profile_image(context) {
Some(path) => path.into_os_string().into_string().unwrap(), Some(path) => path.into_os_string().into_string().unwrap(),
None => "".to_string() None => "".to_string(),
}; };
let draft = match get_draft(context, chat_id) { let draft = match get_draft(context, chat_id) {
Ok(message) => { Ok(message) => match message {
match message { Some(m) => m.text.unwrap_or("".to_string()),
Some(m) => m.text.unwrap_or("".to_string()) , None => "".to_string(),
None => "".to_string()
}
}, },
Err(_) => "".to_string() Err(_) => "".to_string(),
}; };
let s = json!({ let s = json!({