generated from Leafwing-Studios/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
registries: no need for
static mut
or unsafe + use std's LazyLock (#…
…663) * registries: no need for `static mut` or unsafe + use std's LazyLock This fixes nightly rustc yelling about: error: creating a shared reference to mutable static is discouraged --> src/user_input/trait_serde.rs:69:37 | 69 | let mut registry = unsafe { AXISLIKE_REGISTRY.write().unwrap() }; | ^^^^^^^^^^^^^^^^^^^^^^^^^ shared reference to mutable static | = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html> = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives And drops a dependency. * fix a clippy 'empty line after doc comment warning' by making it a regular comment * accept clippy fixes for needless lifetimes
- Loading branch information
1 parent
c2c80ee
commit 37dc091
Showing
5 changed files
with
36 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters