refactor: rename run to finish

This commit is contained in:
Michael Bøcker-Larsen 2020-12-21 11:21:22 +08:00
parent 029da6fd52
commit 8cd8a21008
No known key found for this signature in database
GPG key ID: FEC5F9A03674F95A
2 changed files with 4 additions and 4 deletions

View file

@ -127,7 +127,7 @@ impl<'a, T: Read + Write> AppendCmd<'a, T> {
} }
/// Run command /// Run command
pub fn run(&mut self) -> Result<()> { pub fn finish(&mut self) -> Result<()> {
let flagstr = self let flagstr = self
.flags .flags
.clone() .clone()

View file

@ -254,7 +254,7 @@ fn append() {
c.select(mbox).unwrap(); c.select(mbox).unwrap();
//append //append
c.append(mbox, e.message_to_string().unwrap().as_bytes()) c.append(mbox, e.message_to_string().unwrap().as_bytes())
.run() .finish()
.unwrap(); .unwrap();
// now we should see the e-mail! // now we should see the e-mail!
@ -305,7 +305,7 @@ fn append_with_flags() {
let flags: &[Flag] = &[Flag::Seen, Flag::Flagged]; let flags: &[Flag] = &[Flag::Seen, Flag::Flagged];
c.append(mbox, e.message_to_string().unwrap().as_bytes()) c.append(mbox, e.message_to_string().unwrap().as_bytes())
.flags(flags) .flags(flags)
.run() .finish()
.unwrap(); .unwrap();
// now we should see the e-mail! // now we should see the e-mail!
@ -365,7 +365,7 @@ fn append_with_flags_and_date() {
.flag(Flag::Seen) .flag(Flag::Seen)
.flag(Flag::Flagged) .flag(Flag::Flagged)
.internal_date(date) .internal_date(date)
.run() .finish()
.unwrap(); .unwrap();
// now we should see the e-mail! // now we should see the e-mail!