once_cell -> std

This commit is contained in:
seth 2024-03-30 03:04:32 -04:00
parent a41a84fd2d
commit 90387c5a3b
No known key found for this signature in database
GPG key ID: D31BD0D494BBEE86
28 changed files with 157 additions and 153 deletions

View file

@ -1,5 +1,3 @@
use crate::api::REQWEST_CLIENT;
use eyre::{OptionExt, Result};
use log::debug;
use serde::{Deserialize, Serialize};
@ -20,7 +18,7 @@ pub async fn get_latest_minecraft_version() -> Result<String> {
let url = format!("{META}{MINECRAFT_PACKAGEJSON}");
debug!("Making request to {url}");
let resp = REQWEST_CLIENT.get(url).send().await?;
let resp = super::client().get(url).send().await?;
resp.error_for_status_ref()?;
let data: MinecraftPackageJson = resp.json().await?;