refactor: turn DC_MSG_ID_* into MsgId::* associated constants

This commit is contained in:
link2xt
2026-08-22 01:01:15 +00:00
committed by l
parent fe25e93d6c
commit 6c47e86380
6 changed files with 18 additions and 29 deletions

View File

@@ -228,7 +228,7 @@ async fn log_msg(context: &Context, prefix: impl AsRef<str>, msg: &Message) {
async fn log_msglist(context: &Context, msglist: &[MsgId]) -> Result<()> {
let mut lines_out = 0;
for &msg_id in msglist {
if msg_id == MsgId::new(DC_MSG_ID_DAYMARKER) {
if msg_id == MsgId::DAYMARKER {
println!(
"--------------------------------------------------------------------------------"
);
@@ -630,7 +630,7 @@ pub async fn cmdline(context: Context, line: &str, chat_id: &mut ChatId) -> Resu
.into_iter()
.map(|x| match x {
ChatItem::Message { msg_id } => msg_id,
ChatItem::DayMarker { .. } => MsgId::new(DC_MSG_ID_DAYMARKER),
ChatItem::DayMarker { .. } => MsgId::DAYMARKER,
})
.collect();