Fix more compiler problems

This commit is contained in:
Hocuri
2022-05-05 12:26:52 +02:00
committed by Septias
parent 63162394f6
commit e6ae2170a8
2 changed files with 8 additions and 7 deletions

View File

@@ -7,7 +7,7 @@ use async_std::io::WriteExt;
use strum_macros::{AsRefStr, Display, EnumIter, EnumProperty, EnumString};
use crate::blob::BlobObject;
use crate::chat::ChatId;
use crate::constants::DC_VERSION_STR;
use crate::contact::addr_cmp;
use crate::context::Context;
@@ -332,11 +332,7 @@ impl Context {
if let Some(webxdc_message_id) =
self.sql.get_raw_config_u32(Config::DebugLogging).await?
{
// TODO possible recursion?
//use futures::FutureExt; // for boxed()
//message::delete_msgs(self, &[MsgId::new(webxdc_message_id)])
// .boxed() // Need boxed() because of recursion
// .await;
message::delete_msgs(self, &[MsgId::new(webxdc_message_id)]).await;
}
} else {
let data: &[u8] = include_bytes!("../test-data/webxdc/minimal.xdc");

View File

@@ -1287,7 +1287,12 @@ pub async fn delete_msgs(context: &Context, msg_ids: &[MsgId]) -> Result<()> {
context.emit_msgs_changed_without_ids();
// Run housekeeping to delete unused blobs.
context.set_config(Config::LastHousekeeping, None).await?;
// We need to use set_raw_config() here since with set_config() it
// wouldn't compile ("recursion in an `async fn`")
context
.sql
.set_raw_config(Config::LastHousekeeping, None)
.await?;
}
// Interrupt Inbox loop to start message deletion and run housekeeping.