diff options
Diffstat (limited to 'src/cmd/move_mail.rs')
-rw-r--r-- | src/cmd/move_mail.rs | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/cmd/move_mail.rs b/src/cmd/move_mail.rs deleted file mode 100644 index 146e906..0000000 --- a/src/cmd/move_mail.rs +++ /dev/null @@ -1,18 +0,0 @@ -use std::path::PathBuf; - -use protobuf::Message as _; - -use crate::cmd::open_submaildir; -use crate::error::Result; -use crate::pb3::jwebmail::{MoveReq, MoveResp}; - -pub fn move_mail(p: PathBuf, req: &[u8]) -> Result<Vec<u8>> { - let r = MoveReq::parse_from_bytes(req)?; - - let from = open_submaildir(p.clone(), &r.from_f); - let to = open_submaildir(p, &r.to_f); - from.move_to(&r.mid, &to)?; - - let resp = MoveResp::new(); - resp.write_to_bytes().map_err(|e| e.into()) -} |