🔨 chore(core): apply cargo clippy fixes

This commit is contained in:
Pauline 2024-05-11 06:37:44 +02:00
parent 1a71848be0
commit 4f4af3f3e2
No known key found for this signature in database
GPG key ID: 722BB181973296AE
3 changed files with 7 additions and 4 deletions

View file

@ -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;

View file

@ -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<Utc> {
fn generate_oauth_challenge() -> String {
let mut rng = rand::thread_rng();
let bytes: Vec<u8> = (0..64).map(|_| rng.gen::<u8>()).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.

View file

@ -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,