fix incomplete copy/move (#75)

This commit is contained in:
Clément DOUIN
2021-04-08 13:55:23 +02:00
parent 994141f852
commit daaa37f3a7
3 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -435,7 +435,7 @@ pub fn msg_matches(matches: &ArgMatches) -> Result<()> {
let msg = Msg::from(imap_conn.read_msg(&mbox, &uid)?);
let mut flags = msg.flags.deref().to_vec();
flags.push(Flag::Seen);
imap_conn.append_msg(target, &msg.to_vec()?, &flags)?;
imap_conn.append_msg(target, &msg.raw, &flags)?;
imap_conn.logout();
return Ok(());
}
@@ -447,7 +447,7 @@ pub fn msg_matches(matches: &ArgMatches) -> Result<()> {
let msg = Msg::from(imap_conn.read_msg(&mbox, &uid)?);
let mut flags = msg.flags.deref().to_vec();
flags.push(Flag::Seen);
imap_conn.append_msg(target, &msg.to_vec()?, msg.flags.deref())?;
imap_conn.append_msg(target, &msg.raw, msg.flags.deref())?;
imap_conn.add_flags(mbox, uid, "\\Seen \\Deleted")?;
imap_conn.logout();
return Ok(());
+1 -1
View File
@@ -182,7 +182,7 @@ pub struct Msg<'m> {
#[serde(skip_serializing)]
pub attachments: Vec<String>,
#[serde(skip_serializing)]
raw: Vec<u8>,
pub raw: Vec<u8>,
}
impl<'m> From<Vec<u8>> for Msg<'m> {