From 51ae913bfe3ee42c7da949b32f313a79e9c9f143 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 1 Sep 2021 22:56:31 +0200 Subject: LibIMAP: Stop leaking a Core::Promise in IMAP::Client::connect() --- Userland/Applications/Mail/MailWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Applications/Mail') diff --git a/Userland/Applications/Mail/MailWidget.cpp b/Userland/Applications/Mail/MailWidget.cpp index d2804e5143..709f7406b5 100644 --- a/Userland/Applications/Mail/MailWidget.cpp +++ b/Userland/Applications/Mail/MailWidget.cpp @@ -125,11 +125,11 @@ bool MailWidget::connect_and_login() m_imap_client = make(server, port, tls); auto connection_promise = m_imap_client->connect(); - if (!connection_promise.has_value()) { + if (!connection_promise) { GUI::MessageBox::show_error(window(), String::formatted("Failed to connect to '{}:{}' over {}.", server, port, tls ? "TLS" : "Plaintext")); return false; } - connection_promise.value()->await(); + connection_promise->await(); auto response = m_imap_client->login(username, password)->await().release_value(); -- cgit v1.2.3