refactor(imap): make select_folder() accept non-optional folder

If no folder should be selected,
`maybe_close_folder()` can be called directly.
This commit is contained in:
link2xt
2024-06-04 12:27:56 +00:00
parent 0ca1318118
commit 90c30879b1
4 changed files with 36 additions and 42 deletions

View File

@@ -29,7 +29,7 @@ impl Session {
) -> Result<Self> {
use futures::future::FutureExt;
self.select_folder(context, Some(folder)).await?;
self.select_folder(context, folder).await?;
if self.server_sent_unsolicited_exists(context)? {
return Ok(self);