diff --git a/core/src/api/cluster/mod.rs b/core/src/api/cluster/mod.rs index 494c6437..b9a50054 100644 --- a/core/src/api/cluster/mod.rs +++ b/core/src/api/cluster/mod.rs @@ -13,13 +13,12 @@ use crate::store::MinecraftCredentials; use crate::utils::io::{self, IOError}; -use std::collections::{HashMap}; +use std::collections::HashMap; use std::future::Future; use std::path::{Path, PathBuf}; use std::sync::Arc; -use tokio::io::AsyncReadExt; use tokio::process::Command; use tokio::sync::RwLock; diff --git a/core/src/store/minecraft.rs b/core/src/store/minecraft.rs index 12386f9f..dff16dda 100644 --- a/core/src/store/minecraft.rs +++ b/core/src/store/minecraft.rs @@ -1,5 +1,6 @@ //! Handles MSA Authentication flow. +use std::fmt::Write; use base64::Engine; use chrono::{DateTime, Utc}; use p256::ecdsa::signature::Signer; @@ -984,7 +985,10 @@ fn get_date_header(headers: &reqwest::header::HeaderMap) -> DateTime { fn generate_oauth_challenge() -> String { let mut rng = rand::thread_rng(); let bytes: Vec = (0..64).map(|_| rng.gen::()).collect(); - bytes.iter().map(|b| format!("{:02x}", b)).collect() + bytes.iter().fold(String::new(), |mut output, b| { + let _ = write!(output, "{b:02x}"); + output + }) } /// An ordered list of all MSA authentication steps. diff --git a/core/src/store/package.rs b/core/src/store/package.rs index 224152de..fb904e9f 100644 --- a/core/src/store/package.rs +++ b/core/src/store/package.rs @@ -20,7 +20,7 @@ use super::{Cluster, PackagePath}; /// Creates [`Package`] data for a given [`Cluster`] from on-device files and APIs. /// Paths must be the full paths and not relative paths. -// #[tracing::instrument(skip(paths, cluster, io_semaphore, fetch_semaphore))] +#[tracing::instrument(skip(paths, _cluster, _io_semaphore, _fetch_semaphore))] #[onelauncher_debug::debugger] pub async fn generate_context( _cluster: Cluster,