Fix failure to write to keychain because of dropping a future

This commit is contained in:
Max Brunsfeld 2024-01-11 16:22:34 -08:00
parent 02029c945a
commit 08a4307d71
2 changed files with 3 additions and 5 deletions

View File

@ -1371,10 +1371,7 @@ fn read_credentials_from_keychain(cx: &AsyncAppContext) -> Option<Credentials> {
})
}
async fn write_credentials_to_keychain(
credentials: Credentials,
cx: &AsyncAppContext,
) -> Result<()> {
fn write_credentials_to_keychain(credentials: Credentials, cx: &AsyncAppContext) -> Result<()> {
cx.update(move |cx| {
cx.write_credentials(
&ZED_SERVER_URL,
@ -1384,7 +1381,7 @@ async fn write_credentials_to_keychain(
})?
}
async fn delete_credentials_from_keychain(cx: &AsyncAppContext) -> Result<()> {
fn delete_credentials_from_keychain(cx: &AsyncAppContext) -> Result<()> {
cx.update(move |cx| cx.delete_credentials(&ZED_SERVER_URL))?
}

View File

@ -244,6 +244,7 @@ where
}
}
#[must_use]
pub struct LogErrorFuture<F>(F, log::Level, core::panic::Location<'static>);
impl<F, T, E> Future for LogErrorFuture<F>