Skip to content

Commit

Permalink
Added note for map init const safe todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtread committed Dec 6, 2023
1 parent 94f676f commit b766c04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/components.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ static COMPONENT_NAMES: &[(u16, &str)] = &[
(game_reporting::COMPONENT, "GameReporting"),
(user_sessions::COMPONENT, "UserSessions"),
];

// TODO: Option can be replaced with static init after https://github.com/rust-lang/rust/issues/102575 is stablized
// map creation becomes const stable
static mut COMMANDS: Option<IntHashMap<ComponentKey, &'static str>> = None;
static mut NOTIFICATIONS: Option<IntHashMap<ComponentKey, &'static str>> = None;

Expand Down

0 comments on commit b766c04

Please sign in to comment.