fix unused Return value
This commit is contained in:
parent
fb2a5e8c02
commit
3b11775582
1 changed files with 8 additions and 8 deletions
16
src/main.rs
16
src/main.rs
|
@ -126,8 +126,8 @@ fn cook(
|
||||||
};
|
};
|
||||||
|
|
||||||
// ENCODE: StartData and TypeData, ALWAYS
|
// ENCODE: StartData and TypeData, ALWAYS
|
||||||
encode_startdata(&mut fr_params);
|
encode_startdata(&mut fr_params)?;
|
||||||
encode_typedata(&mut fr_params, json_config.item_type);
|
encode_typedata(&mut fr_params, json_config.item_type)?;
|
||||||
|
|
||||||
// ENCODE: CustomGearTypeData / CustomConsumableTypeData
|
// ENCODE: CustomGearTypeData / CustomConsumableTypeData
|
||||||
match json_config.item_type {
|
match json_config.item_type {
|
||||||
|
@ -145,7 +145,7 @@ fn cook(
|
||||||
match json_config.item_type {
|
match json_config.item_type {
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ fn cook(
|
||||||
match json_config.item_type {
|
match json_config.item_type {
|
||||||
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
||||||
if let Some(real_ids) = &json_config.ids {
|
if let Some(real_ids) = &json_config.ids {
|
||||||
encode_iddata(&mut fr_params, real_ids, idsmap)
|
encode_iddata(&mut fr_params, real_ids, idsmap)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -179,7 +179,7 @@ fn cook(
|
||||||
match json_config.item_type {
|
match json_config.item_type {
|
||||||
ItemTypeDeser::CraftedGear | ItemTypeDeser::CraftedConsu => {
|
ItemTypeDeser::CraftedGear | ItemTypeDeser::CraftedConsu => {
|
||||||
if let Some(real_reqs) = json_config.requirements {
|
if let Some(real_reqs) = json_config.requirements {
|
||||||
encode_reqdata(&mut fr_params, real_reqs)
|
encode_reqdata(&mut fr_params, real_reqs)?
|
||||||
} else {
|
} else {
|
||||||
return Err(Errorfr::JsonNotFoundReqs);
|
return Err(Errorfr::JsonNotFoundReqs);
|
||||||
}
|
}
|
||||||
|
@ -202,7 +202,7 @@ fn cook(
|
||||||
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
ItemTypeDeser::Gear | ItemTypeDeser::Tome | ItemTypeDeser::Charm => {
|
||||||
if let Some(rerollcount) = json_config.rerolls {
|
if let Some(rerollcount) = json_config.rerolls {
|
||||||
// rerolldata
|
// rerolldata
|
||||||
encode_rerolldata(&mut fr_params, rerollcount)
|
encode_rerolldata(&mut fr_params, rerollcount)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
|
@ -212,14 +212,14 @@ fn cook(
|
||||||
match json_config.item_type {
|
match json_config.item_type {
|
||||||
ItemTypeDeser::Gear => {
|
ItemTypeDeser::Gear => {
|
||||||
if let Some(shiny) = &json_config.shiny {
|
if let Some(shiny) = &json_config.shiny {
|
||||||
encode_shinydata(&mut fr_params, shiny, &json_shiny)
|
encode_shinydata(&mut fr_params, shiny, &json_shiny)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ENCODE: EndData, ALWAYS
|
// ENCODE: EndData, ALWAYS
|
||||||
encode_enddata(&mut fr_params);
|
encode_enddata(&mut fr_params)?;
|
||||||
|
|
||||||
let mut final_string: String = encode_string(out);
|
let mut final_string: String = encode_string(out);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue