A bunch of fixes and improvements
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2022-09-17 09:38:02 +02:00
parent 7bcfd92d45
commit a4fd112a07
15 changed files with 179 additions and 100 deletions

View File

@@ -1,4 +1,4 @@
use std::sync::Arc;
use std::sync::{Arc, LazyLock};
use hashbrown::{HashMap, HashSet};
@@ -29,11 +29,11 @@ pub struct Species {
}
/// A cached String Key to get the default form.
static DEFAULT_KEY: conquer_once::OnceCell<StringKey> = conquer_once::OnceCell::uninit();
static DEFAULT_KEY: LazyLock<StringKey> = LazyLock::new(|| StringKey::new("default"));
/// Gets the StringKey for "default". Initialises it if it does not exist.
fn get_default_key() -> StringKey {
DEFAULT_KEY.get_or_init(|| StringKey::new("default")).clone()
DEFAULT_KEY.clone()
}
impl Species {