fmt stuff
This commit is contained in:
parent
f678b418a8
commit
f4cdf669cf
2 changed files with 7 additions and 13 deletions
|
@ -45,5 +45,5 @@ pub enum Errorfr {
|
||||||
|
|
||||||
/// Name value was not found in json
|
/// 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
|
JsonNotFoundName,
|
||||||
}
|
}
|
||||||
|
|
18
src/main.rs
18
src/main.rs
|
@ -1,6 +1,4 @@
|
||||||
#![allow(
|
#![allow(clippy::single_match)]
|
||||||
clippy::single_match
|
|
||||||
)]
|
|
||||||
|
|
||||||
use idmangler_lib::{
|
use idmangler_lib::{
|
||||||
encoding::encode_string,
|
encoding::encode_string,
|
||||||
|
@ -94,14 +92,11 @@ fn main() {
|
||||||
loaded_idkeys,
|
loaded_idkeys,
|
||||||
loaded_shinystats,
|
loaded_shinystats,
|
||||||
) {
|
) {
|
||||||
println!("{}", e);
|
println!("{}", e); // print error if there is an error
|
||||||
}
|
} else {
|
||||||
else {
|
// final string print if there is no error
|
||||||
// final string print
|
|
||||||
println!("{}", encode_string(&out))
|
println!("{}", encode_string(&out))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
Err(e) => println!("{}", e),
|
Err(e) => println!("{}", e),
|
||||||
}
|
}
|
||||||
|
@ -137,9 +132,8 @@ fn cook(
|
||||||
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
||||||
if let Some(real_name) = json_config.name {
|
if let Some(real_name) = json_config.name {
|
||||||
encode_namedata(&mut fr_params, &real_name)
|
encode_namedata(&mut fr_params, &real_name)
|
||||||
}
|
} else {
|
||||||
else {
|
return Err(Errorfr::JsonNotFoundName);
|
||||||
return Err(Errorfr::JsonNotFoundName)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
|
Loading…
Reference in a new issue