diff --git a/apps/testing/examples/murmur2_hash.rs b/apps/testing/examples/murmur2_hash.rs index a0295f5..82cdfac 100644 --- a/apps/testing/examples/murmur2_hash.rs +++ b/apps/testing/examples/murmur2_hash.rs @@ -10,5 +10,5 @@ fn main() { dbg!(hash); dbg!(hash as u64); - assert_eq!(hash, 661461369); + assert_eq!(hash, 661_461_369); } \ No newline at end of file diff --git a/packages/core/src/api/cluster/content/package.rs b/packages/core/src/api/cluster/content/package.rs index 36ca08d..7307fcb 100644 --- a/packages/core/src/api/cluster/content/package.rs +++ b/packages/core/src/api/cluster/content/package.rs @@ -36,8 +36,8 @@ pub async fn find_managed_version( Ok(versions.0 .iter() .find(|v| { - if package_version.is_some() { - return v.id == *package_version.as_ref().unwrap(); + if let Some(package_version) = package_version.as_ref() { + return v.id == *package_version; } let check_game_version = game_version diff --git a/packages/core/src/store/mod.rs b/packages/core/src/store/mod.rs index 079d45f..83e0772 100644 --- a/packages/core/src/store/mod.rs +++ b/packages/core/src/store/mod.rs @@ -144,7 +144,7 @@ impl State { }?; send_ingress(&ingress, 5.0, Some("loading packages")).await?; - let packages = Packages::initialize(&clusters).await; + let packages = Packages::initialize(&clusters); let ingress_processor = IngressProcessor::new(); let discord_rpc = DiscordRPC::initialize(is_offline || settings.disable_discord)?; diff --git a/packages/core/src/store/package.rs b/packages/core/src/store/package.rs index 64fa236..549410e 100644 --- a/packages/core/src/store/package.rs +++ b/packages/core/src/store/package.rs @@ -200,7 +200,7 @@ pub struct Packages { } impl Packages { - pub async fn initialize(clusters: &Clusters) -> Self { + pub fn initialize(clusters: &Clusters) -> Self { let mut this = Self { managers: HashMap::new() }; // TODO: This should probably not clone and store the cluster path in like 2 areas