mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 13:17:55 +08:00
review copy command
This commit is contained in:
@@ -44,4 +44,5 @@ pub fn target_arg<'a>() -> Arg<'a, 'a> {
|
||||
Arg::with_name("target")
|
||||
.help("Specifies the targetted mailbox")
|
||||
.value_name("TARGET")
|
||||
.required(true)
|
||||
}
|
||||
|
||||
@@ -152,7 +152,9 @@ impl TryFrom<Option<&str>> for Mbox {
|
||||
fn try_from(mbox: Option<&str>) -> Result<Self, Self::Error> {
|
||||
debug!("init mailbox from `{:?}`", mbox);
|
||||
Ok(Self {
|
||||
name: mbox.ok_or(anyhow!("cannot parse mailbox"))?.to_string(),
|
||||
name: mbox
|
||||
.ok_or(anyhow!("the target mailbox cannot be empty"))?
|
||||
.to_string(),
|
||||
..Self::default()
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user