cargo fmt

This commit is contained in:
Simon Laux
2020-05-11 06:31:48 +02:00
committed by holger krekel
parent fe23907eb3
commit c2c0c81f1c

View File

@@ -2073,12 +2073,12 @@ impl rusqlite::types::FromSql for MuteDuration {
pub fn set_muted(context: &Context, chat_id: ChatId, duration: MuteDuration) -> Result<(), Error> { pub fn set_muted(context: &Context, chat_id: ChatId, duration: MuteDuration) -> Result<(), Error> {
ensure!(!chat_id.is_special(), "Invalid chat ID"); ensure!(!chat_id.is_special(), "Invalid chat ID");
if sql::execute( if sql::execute(
context, context,
&context.sql, &context.sql,
"UPDATE chats SET muted_until=? WHERE id=?;", "UPDATE chats SET muted_until=? WHERE id=?;",
params![duration, chat_id], params![duration, chat_id],
) )
.is_ok() .is_ok()
{ {
context.call_cb(Event::ChatModified(chat_id)); context.call_cb(Event::ChatModified(chat_id));
} else { } else {