Rename IIFE to maybe (#3165)

Too good of an idea to forget

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2023-10-25 17:09:12 +02:00 committed by GitHub
commit f67f42779b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 22 deletions

View file

@ -19,7 +19,7 @@ use std::{
},
};
use util::{
async_iife,
async_maybe,
fs::remove_matching,
github::{latest_github_release, GitHubLspBinaryVersion},
ResultExt,
@ -421,7 +421,7 @@ impl LspAdapter for NextLspAdapter {
}
async fn get_cached_server_binary_next(container_dir: PathBuf) -> Option<LanguageServerBinary> {
async_iife!({
async_maybe!({
let mut last_binary_path = None;
let mut entries = fs::read_dir(&container_dir).await?;
while let Some(entry) = entries.next().await {

View file

@ -8,7 +8,7 @@ use lsp::LanguageServerBinary;
use smol::fs;
use std::{any::Any, env::consts, path::PathBuf};
use util::{
async_iife,
async_maybe,
github::{latest_github_release, GitHubLspBinaryVersion},
ResultExt,
};
@ -106,7 +106,7 @@ impl super::LspAdapter for LuaLspAdapter {
}
async fn get_cached_server_binary(container_dir: PathBuf) -> Option<LanguageServerBinary> {
async_iife!({
async_maybe!({
let mut last_binary_path = None;
let mut entries = fs::read_dir(&container_dir).await?;
while let Some(entry) = entries.next().await {