diff options
| author | Zeyla Hellyer <[email protected]> | 2017-10-12 21:41:21 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-14 12:27:07 -0700 |
| commit | 11b85ca6799b9984481119851f983d8e3c84cdc0 (patch) | |
| tree | d24bf270bd7e48c77ea7f3471f0dbe0a219f8f1f | |
| parent | Fix font-height in relation to the logo (#192) (diff) | |
| download | serenity-11b85ca6799b9984481119851f983d8e3c84cdc0.tar.xz serenity-11b85ca6799b9984481119851f983d8e3c84cdc0.zip | |
Feature-flag extern crates behind their name
An issue with modifying what features enable compilation of what
crates was possible due to crates being feature-flagged behind a module
name instead of their own name.
Instead of writing cfg features for crates as:
```rust
\#[cfg(feature = "utils")]
extern crate base64;
```
Write the feature name as its own name:
```rust
\#[cfg(feature = "base64")]
extern crate base64;
```
This way, crates can simply have compilation enabled in the project's
features section in the `Cargo.toml` file.
| -rw-r--r-- | src/lib.rs | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -106,33 +106,33 @@ extern crate lazy_static; extern crate chrono; extern crate serde; -#[cfg(feature = "utils")] +#[cfg(feature = "base64")] extern crate base64; -#[cfg(feature = "voice")] +#[cfg(feature = "byteorder")] extern crate byteorder; -#[cfg(feature = "gateway")] +#[cfg(feature = "flate2")] extern crate flate2; #[cfg(feature = "hyper")] extern crate hyper; #[cfg(feature = "hyper-native-tls")] extern crate hyper_native_tls; -#[cfg(feature = "http")] +#[cfg(feature = "multipart")] extern crate multipart; #[cfg(feature = "native-tls")] extern crate native_tls; -#[cfg(feature = "voice")] +#[cfg(feature = "opus")] extern crate opus; -#[cfg(feature = "client")] +#[cfg(feature = "parking_lot")] extern crate parking_lot; -#[cfg(feature = "voice")] +#[cfg(feature = "sodiumoxide")] extern crate sodiumoxide; #[cfg(feature = "threadpool")] extern crate threadpool; -#[cfg(feature = "client")] +#[cfg(feature = "typemap")] extern crate typemap; -#[cfg(feature = "standard_framework")] +#[cfg(feature = "vec_shift")] extern crate vec_shift; -#[cfg(feature = "gateway")] +#[cfg(feature = "evzht9h3nznqzwl")] extern crate evzht9h3nznqzwl as websocket; #[macro_use] |