Skip to content

Commit

Permalink
# static-keys v0.6.0
Browse files Browse the repository at this point in the history
The `GenericStaticKey::enable` and `GenericStaticKey::disable` now accept shared reference of `self` instead of `&mut self`, and `define_static_key_false!` and `define_static_key_true!` now produce a immutable static variable. The static key has been changed to interior mutable in order to meet the Rust 2024 edition's requirement, which does not allow mutable static.

Remove feature declaration of `asm_const` since it has been stabilized in Rust 1.82.0.
  • Loading branch information
Evian-Zhang committed Sep 22, 2024
1 parent 213a5ca commit 4f6d0c9
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG/v0.6.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# static-keys v0.6.0

The `GenericStaticKey::enable` and `GenericStaticKey::disable` now accept shared reference of `self` instead of `&mut self`, and `define_static_key_false!` and `define_static_key_true!` now produce a immutable static variable. The static key has been changed to interior mutable in order to meet the Rust 2024 edition's requirement, which does not allow mutable static.

Remove feature declaration of `asm_const` since it has been stabilized in Rust 1.82.0.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "static-keys"
version = "0.5.0"
version = "0.6.0"
edition = "2021"
authors = ["Evian-Zhang <[email protected]>"]
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ First, add this crate to your `Cargo.toml`:

```toml
[dependencies]
static-keys = "0.5"
static-keys = "0.6"
```

At the beginning of `main` function, you should invoke [`static_keys::global_init`](https://docs.rs/static-keys/latest/static_keys/fn.global_init.html) to initialize.
Expand Down
2 changes: 1 addition & 1 deletion docs/en/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ First, add this crate to your `Cargo.toml`:

```toml
[dependencies]
static-keys = "0.5"
static-keys = "0.6"
```

At the beginning of `main` function, you should invoke [`static_keys::global_init`](https://docs.rs/static-keys/latest/static_keys/fn.global_init.html) to initialize.
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-Hans/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ do_something:

```toml
[dependencies]
static-keys = "0.5"
static-keys = "0.6"
```

`main`函数开头,需要调用[`static_keys::global_init`](https://docs.rs/static-keys/latest/static_keys/fn.global_init.html)进行初始化。
Expand Down

0 comments on commit 4f6d0c9

Please sign in to comment.