Skip to content

Commit

Permalink
run fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
RedstoneWizard08 committed Aug 31, 2024
1 parent 36a6387 commit 8d3da38
Show file tree
Hide file tree
Showing 6 changed files with 3,558 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/commands/src/router.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use data::prisma::{PrismaClient, instance, installed_mod};
use data::prisma::{installed_mod, instance, PrismaClient};
use rpc_rs::{prisma_module, prisma_module_filtered, Router};

pub fn build_router() -> Router<Arc<PrismaClient>> {
Expand Down
3,543 changes: 3,542 additions & 1 deletion crates/data/src/prisma.rs

Large diffs are not rendered by default.

18 changes: 13 additions & 5 deletions crates/mcmeta/src/installer/libs.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use std::{collections::HashMap, fs, path::PathBuf};
use crate::vanilla::manifest::libraries::Library;
use anyhow::Result;
use std::{collections::HashMap, fs, path::PathBuf};
use tokio_stream::StreamExt;
use crate::vanilla::manifest::libraries::Library;

pub struct LibraryInstaller {
/// A list of listeners.
Expand All @@ -16,18 +16,26 @@ impl LibraryInstaller {
}
}

pub fn add_listener<T>(&mut self, func: T) -> &mut Self where T: Fn(&PathBuf, u64, u64) + 'static {
pub fn add_listener<T>(&mut self, func: T) -> &mut Self
where
T: Fn(&PathBuf, u64, u64) + 'static,
{
self.listeners.push(Box::new(func));
self
}

/// Download library files into a root directory.
///
///
/// Args:
/// - root: The root of the library folder.
/// - libs: The libraries to download.
/// - features: Enabled launcher features.
pub async fn install_libraries(&self, root: PathBuf, libs: Vec<Library>, features: &HashMap<String, bool>) -> Result<()> {
pub async fn install_libraries(
&self,
root: PathBuf,
libs: Vec<Library>,
features: &HashMap<String, bool>,
) -> Result<()> {
for lib in libs {
let files = lib.get_files(features);

Expand Down
2 changes: 1 addition & 1 deletion crates/mcmeta/src/installer/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod manifest;
pub mod libs;
pub mod manifest;
2 changes: 1 addition & 1 deletion crates/mcmeta/src/maven/artifact.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Artifact {
let data = data.as_ref();
let raw = data.split("@").collect::<Vec<_>>();
let mut data = raw.get(0).unwrap().split(":");

let ext = if raw.len() > 1 {
raw.get(1).unwrap().to_string()
} else {
Expand Down
1 change: 0 additions & 1 deletion crates/plugins/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//! # Plugins for Wormhole.
//!
//! This implements all of Wormhole's plugins and game supports.

0 comments on commit 8d3da38

Please sign in to comment.