mirror of
https://github.com/chatmail/core.git
synced 2026-05-22 16:26:31 +03:00
Do not pass Result as a function argument
This commit is contained in:
@@ -70,7 +70,7 @@ pub async fn maybe_set_logging_xdc(
|
|||||||
context,
|
context,
|
||||||
msg.get_viewtype(),
|
msg.get_viewtype(),
|
||||||
chat_id,
|
chat_id,
|
||||||
msg.param.get_path(Param::File, context),
|
msg.param.get_path(Param::File, context).unwrap_or_default(),
|
||||||
msg.get_id(),
|
msg.get_id(),
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
@@ -83,11 +83,11 @@ pub async fn maybe_set_logging_xdc_inner(
|
|||||||
context: &Context,
|
context: &Context,
|
||||||
viewtype: Viewtype,
|
viewtype: Viewtype,
|
||||||
chat_id: ChatId,
|
chat_id: ChatId,
|
||||||
file: anyhow::Result<Option<PathBuf>>,
|
file: Option<PathBuf>,
|
||||||
msg_id: MsgId,
|
msg_id: MsgId,
|
||||||
) -> anyhow::Result<()> {
|
) -> anyhow::Result<()> {
|
||||||
if viewtype == Viewtype::Webxdc {
|
if viewtype == Viewtype::Webxdc {
|
||||||
if let Ok(Some(file)) = file {
|
if let Some(file) = file {
|
||||||
if let Some(file_name) = file.file_name().and_then(|name| name.to_str()) {
|
if let Some(file_name) = file.file_name().and_then(|name| name.to_str()) {
|
||||||
if file_name.starts_with("debug_logging")
|
if file_name.starts_with("debug_logging")
|
||||||
&& file_name.ends_with(".xdc")
|
&& file_name.ends_with(".xdc")
|
||||||
|
|||||||
@@ -1237,7 +1237,9 @@ SET rfc724_mid=excluded.rfc724_mid, chat_id=excluded.chat_id,
|
|||||||
context,
|
context,
|
||||||
part.typ,
|
part.typ,
|
||||||
chat_id,
|
chat_id,
|
||||||
part.param.get_path(Param::File, context),
|
part.param
|
||||||
|
.get_path(Param::File, context)
|
||||||
|
.unwrap_or_default(),
|
||||||
*msg_id,
|
*msg_id,
|
||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|||||||
Reference in New Issue
Block a user