cargo fmt

This commit is contained in:
endernon 2025-01-02 12:25:49 +00:00
parent bc063bae6e
commit 9459b6adb9
5 changed files with 36 additions and 31 deletions

View file

@ -1,7 +1,12 @@
use std::collections::HashMap;
use idmangler_lib::{DataEncoder, EndData, IdentificationData, NameData, PowderData, RerollData, ShinyData, StartData, TypeData};
use crate::jsonstruct::{
FuncParams, Identificationer, ItemTypeDeser, Powder, Shinyjson, Shinystruct,
};
use idmangler_lib::types::{Element, ItemType, RollType, Stat};
use crate::jsonstruct::{FuncParams, Identificationer, ItemTypeDeser, Powder, Shinyjson, Shinystruct};
use idmangler_lib::{
DataEncoder, EndData, IdentificationData, NameData, PowderData, RerollData, ShinyData,
StartData, TypeData,
};
use std::collections::HashMap;
pub fn encode_startdata(general_params: &mut FuncParams) {
// ENCODE: StartData
@ -103,7 +108,11 @@ pub fn encode_reroll(general_params: &mut FuncParams, rerollcount: u8) {
}
}
}
pub fn encode_shiny(general_params: &mut FuncParams, shiny: Shinyjson, json_shiny: Vec<Shinystruct>) {
pub fn encode_shiny(
general_params: &mut FuncParams,
shiny: Shinyjson,
json_shiny: Vec<Shinystruct>,
) {
let mut realshinykey: u8;
let _shinykey = &shiny.key;
let shinyvalue = shiny.value;

View file

@ -44,6 +44,8 @@ pub enum Errorfr {
JsonDlReqFileWriteFail,
/// Name value was not found in json
#[error("Error 3.4: \"name\" field was not found in the json (required for Gear, Tome, Charm).")]
#[error(
"Error 3.4: \"name\" field was not found in the json (required for Gear, Tome, Charm)."
)]
JsonNotFoundName,
}

View file

@ -1,10 +1,9 @@
use std::collections::HashMap;
use std::fs;
use serde::Deserialize;
use crate::dl_json;
use crate::errorfr::Errorfr;
use crate::jsonstruct::{Shinystruct};
use crate::jsonstruct::Shinystruct;
use serde::Deserialize;
use std::collections::HashMap;
use std::fs;
pub fn load_idkeys(executable_path: &str) -> Result<HashMap<String, u8>, Errorfr> {
// id_keys.json

View file

@ -1,7 +1,7 @@
use std::fs;
use crate::errorfr::Errorfr;
use idmangler_lib::types::{ItemType, TransformVersion};
use serde::Deserialize;
use crate::errorfr::Errorfr;
use std::fs;
// structs for the json parsing
#[derive(Deserialize)]

View file

@ -1,20 +1,17 @@
#![allow(clippy::single_match)]
use idmangler_lib::{
encoding::encode_string,
types::TransformVersion,
};
use idmangler_lib::{encoding::encode_string, types::TransformVersion};
use std::{collections::HashMap, env, fs, io, path::PathBuf};
mod jsonstruct;
mod errorfr;
mod encode;
mod errorfr;
mod jsondl;
use crate::jsonstruct::*;
use crate::errorfr::Errorfr;
mod jsonstruct;
use crate::encode::*;
use crate::errorfr::Errorfr;
use crate::jsondl::*;
use crate::jsonstruct::*;
use clap::Parser;
use reqwest::Url;
@ -185,5 +182,3 @@ fn cook(
Ok(())
}