Skip to content

Commit

Permalink
replace other uses of insert with try_insert
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Feb 24, 2024
1 parent d70def5 commit daa38aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backends/bevy_picking_egui/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn update_settings(
.remove::<bevy_picking_selection::NoDeselect>(),
false => commands
.entity(entity)
.insert(bevy_picking_selection::NoDeselect),
.try_insert(bevy_picking_selection::NoDeselect),
};
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/bevy_picking_highlight/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub fn get_initial_highlight_asset<T: Asset>(
match highlighting_query.get_mut(entity) {
Ok(Some(mut highlighting)) => highlighting.initial = material.to_owned(),
_ => {
commands.entity(entity).insert(InitialHighlight {
commands.entity(entity).try_insert(InitialHighlight {
initial: material.to_owned(),
});
}
Expand Down

0 comments on commit daa38aa

Please sign in to comment.