Skip to content

Commit

Permalink
clippyd
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Nov 5, 2023
1 parent 9bf661d commit 8c6be96
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/reaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,23 +105,19 @@ impl Reaction {
let min_temp_req = min_reqs
.read_list_index("TEMP")
.ok()
.map(|item| item.get_number().ok())
.flatten();
.and_then(|item| item.get_number().ok());
let max_temp_req = min_reqs
.read_list_index("MAX_TEMP")
.ok()
.map(|item| item.get_number().ok())
.flatten();
.and_then(|item| item.get_number().ok());
let min_ener_req = min_reqs
.read_list_index("ENER")
.ok()
.map(|item| item.get_number().ok())
.flatten();
.and_then(|item| item.get_number().ok());
let min_fire_req = min_reqs
.read_list_index("FIRE_REAGENTS")
.ok()
.map(|item| item.get_number().ok())
.flatten();
.and_then(|item| item.get_number().ok());
Ok(Reaction {
id,
priority,
Expand Down

0 comments on commit 8c6be96

Please sign in to comment.