diff --git a/rustfmt.toml b/rustfmt.toml index a290d1b..63788ab 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,3 +1,3 @@ fn_params_layout = "Compressed" -attr_fn_like_width = 120 -max_width = 140 \ No newline at end of file +attr_fn_like_width = 140 +max_width = 160 \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 7d81223..1b7c13c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,21 +1,20 @@ #![allow(clippy::single_match)] #![allow(non_camel_case_types, non_snake_case)] -use idmangler_lib::{encoding::string::encode_string, types::EncodingVersion}; - -use std::{collections::HashMap, env, fs, io, path::PathBuf}; mod encode; mod errorfr; mod jsondl; mod jsonstruct; mod gearjson; - +use idmangler_lib::{encoding::string::encode_string, types::EncodingVersion}; +use std::{collections::HashMap, env, fs, io, path::PathBuf}; +use clap::Parser; +use reqwest::Url; use crate::errorfr::Errorfr; use crate::jsondl::*; use crate::jsonstruct::*; -use clap::Parser; -use reqwest::Url; + #[derive(Parser, Debug, Clone)] #[command(version, about, long_about = None, arg_required_else_help(true))] @@ -96,7 +95,7 @@ fn main() { // ENCODE: A Lot Of Stuff // Also print any mapped errors - let cooking = cook(&mut out, &debug_mode, ver, &loaded_config_borrow, loaded_idkeys, loaded_shinystats); + let cooking = cook(&mut out, &debug_mode, ver, &mut loaded_config_borrow, loaded_idkeys, loaded_shinystats); if let Err(e) = cooking { println!("{}", e); // print error if there is an error } else { @@ -116,7 +115,7 @@ fn main() { } fn cook( - out: &mut Vec, debug_mode: &bool, ver: EncodingVersion, json_config: &Jsonconfig, idsmap: HashMap, + out: &mut Vec, debug_mode: &bool, ver: EncodingVersion, json_config: &mut Jsonconfig, idsmap: HashMap, json_shiny: Vec, ) -> Result { let mut fr_params = FuncParams { @@ -237,3 +236,10 @@ fn cook( Ok(final_string) } + +fn cook_perfect( + out: &mut Vec, debug_mode: &bool, ver: EncodingVersion, json_config: &Jsonconfig, idsmap: HashMap, + json_shiny: Vec, +) -> Result { + Ok("fr".parse().unwrap()) +} \ No newline at end of file