Skip to content

Commit

Permalink
Fix feature name casing (#2051)
Browse files Browse the repository at this point in the history
  • Loading branch information
GnomedDev authored Jul 19, 2022
1 parent 0a53345 commit 06c031b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ gateway = ["flate2", "http", "utils"]
http = []
absolute_ratelimits = ["http"]
model = ["builder", "http"]
voice-model = ["serenity-voice-model"]
voice_model = ["serenity-voice-model"]
standard_framework = ["framework", "uwl", "levenshtein", "command_attr", "static_assertions"]
unstable_discord_api = []
utils = ["base64"]
Expand All @@ -188,7 +188,7 @@ tokio_task_builder = ["tokio/tracing"]
time = []

# Enables simd accelerated parsing
simdjson = ["simd-json"]
simd_json = ["simd-json"]

# Enables temporary caching in functions that retrieve data via the HTTP API.
temp_cache = ["cache", "moka"]
Expand All @@ -210,6 +210,10 @@ native_tls_backend = [
"bytes",
]

# TODO(next): Remove, these are deprecated aliases
simdjson = ["simd_json"]
voice-model = ["voice_model"]

[package.metadata.docs.rs]
features = ["default", "collector", "unstable_discord_api", "voice", "voice-model"]
rustdoc-args = ["--cfg", "docsrs"]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ due to latency in the network. If you turn this feature on, it is recommended to
synchronise your clock with an NTP server (such as Google's).
- **tokio_task_builder**: Enables tokio's `tracing` feature and uses `tokio::task::Builder` to spawn tasks with names if `RUSTFLAGS="--cfg tokio_unstable"` is set.
- **unstable_discord_api**: Enables features of the Discord API that do not have a stable interface. The features might not have official documentation or are subject to change.
- **simdjson**: Enables SIMD accelerated JSON parsing and rendering for API calls, use with `RUSTFLAGS="-C target-cpu=native"`
- **simd_json**: Enables SIMD accelerated JSON parsing and rendering for API calls, use with `RUSTFLAGS="-C target-cpu=native"`
- **temp_cache**: Enables temporary caching in functions that retrieve data via the HTTP API.

Serenity offers two TLS-backends, `rustls_backend` by default, you need to pick
Expand Down
17 changes: 16 additions & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,19 @@ compile_error!(
If you are unsure, go with `rustls_backend`."
);

fn main() {}
#[cfg_attr(
feature = "simdjson",
deprecated = "The `simdjson` feature name is deprecated and will be removed in the next version of serenity, use `simd_json`."
)]
fn deprecated_simd_json_feature() {}

#[cfg_attr(
feature = "voice-model",
deprecated = "The `voice-model` feature name is deprecated and will be removed in the next version of serenity, use `voice_model`."
)]
fn deprecated_voice_model_feature() {}

fn main() {
deprecated_simd_json_feature();
deprecated_voice_model_feature()
}

0 comments on commit 06c031b

Please sign in to comment.