clippy stuff

This commit is contained in:
endernon 2025-01-03 15:12:14 +00:00
parent e5455fddd8
commit 658b9b758e
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ pub fn encode_duradata(general_params: &mut FuncParams, real_dura: Durability) -
// new range is 50-10 = 40
let new_range = 40;
// NewValue = (((OldValue - OldMin) * NewRange) / OldRange) + NewMin
effect_strength_fr = ((((current_percentage - 0) * new_range) / old_range) + 10) as u8
effect_strength_fr = ((((current_percentage) * new_range) / old_range) + 10) as u8
}
else {
return Err(Errorfr::JsonDuraOutOfRange)

View file

@ -129,7 +129,7 @@ fn cook(
match json_config.item_type {
ItemTypeDeser::CraftedGear | ItemTypeDeser::CraftedConsu => {
if let Some(real_crafted_type) = json_config.crafted_type {
return encode_typedata_custom(&mut fr_params, &*real_crafted_type);
return encode_typedata_custom(&mut fr_params, &real_crafted_type);
}
else {
return Err(JsonNotFoundCraftedType)