Skip to content

Commit

Permalink
Makes the REACTION_INFO writes idiomatic
Browse files Browse the repository at this point in the history
  • Loading branch information
Putnam3145 committed Feb 19, 2022
1 parent 3cbf0d7 commit 0e8f834
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gas/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ fn _hook_init() {
&mut vec![data.get(data.get(i)?)?],
)?;
}
REACTION_INFO.write().insert(get_reaction_info());
*REACTION_INFO.write() = Some(get_reaction_info());
Ok(Value::from(true))
}

Expand All @@ -289,7 +289,7 @@ fn get_reaction_info() -> Vec<Reaction> {

#[hook("/datum/controller/subsystem/air/proc/auxtools_update_reactions")]
fn _update_reactions() {
REACTION_INFO.write().insert(get_reaction_info());
*REACTION_INFO.write() = Some(get_reaction_info());
Ok(Value::from(true))
}

Expand Down

0 comments on commit 0e8f834

Please sign in to comment.