Skip to content

Commit

Permalink
Merge pull request #604 from andrewdavidmackenzie/master
Browse files Browse the repository at this point in the history
Drop use of deprecated form "default_features"
  • Loading branch information
AaronErhardt authored Jul 1, 2024
2 parents 1ca0b7e + fc080c0 commit 87b286f
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo
The following code shows a minimal example of this.

```text
:dep plotters = { version = "^0.3.6", default_features = false, features = ["evcxr", "all_series", "all_elements"] }
:dep plotters = { version = "^0.3.6", default-features = false, features = ["evcxr", "all_series", "all_elements"] }
extern crate plotters;
use plotters::prelude::*;
Expand Down Expand Up @@ -504,7 +504,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" }

### Reducing Depending Libraries && Turning Off Backends
Plotters now supports use features to control the backend dependencies. By default, `BitMapBackend` and `SVGBackend` are supported,
use `default_features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations.
use `default-features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations.

- `svg` Enable the `SVGBackend`
- `bitmap` Enable the `BitMapBackend`
Expand All @@ -513,16 +513,16 @@ For example, the following dependency description would avoid compiling with bit

```toml
[dependencies]
plotters = { git = "https://github.com/plotters-rs/plotters.git", default_features = false, features = ["svg"] }
plotters = { git = "https://github.com/plotters-rs/plotters.git", default-features = false, features = ["svg"] }
```

The library also allows consumers to make use of the [`Palette`](https://crates.io/crates/palette/) crate's color types by default.
This behavior can also be turned off by setting `default_features = false`.
This behavior can also be turned off by setting `default-features = false`.

### List of Features

This is the full list of features that is defined by `Plotters` crate.
Use `default_features = false` to disable those default enabled features,
Use `default-features = false` to disable those default enabled features,
and then you should be able to cherry-pick what features you want to include into `Plotters` crate.
By doing so, you can minimize the number of dependencies down to only `itertools` and compile time is less than 6s.

Expand Down
4 changes: 2 additions & 2 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ Thus, if plotters is imported with default feature set, there would require no c
should be make with your `Crates.toml`:

```toml
plotters = {version = "0.3", default_features = false, features = ["bitmap_backend", "svg_backend"]} # Instead of using feature "bitmap" and "svg"
plotters = {version = "0.3", default-features = false, features = ["bitmap_backend", "svg_backend"]} # Instead of using feature "bitmap" and "svg"
```

For non tier 1 backends, manmually import is required (Please note tier on backends can be imported in same way). For example:

```toml
plotters = {version = "0.3", default_features = false} # Instead of having features = ["cairo"] at this point
plotters = {version = "0.3", default-features = false} # Instead of having features = ["cairo"] at this point
plotters-cairo = "0.3" # We should import the cairo backend in this way.
```

Expand Down
10 changes: 5 additions & 5 deletions doc-template/readme.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo
The following code shows a minimal example of this.

```text
:dep plotters = { git = "https://github.com/plotters-rs/plotters", default_features = false, features = ["evcxr"] }
:dep plotters = { git = "https://github.com/plotters-rs/plotters", default-features = false, features = ["evcxr"] }
extern crate plotters;
use plotters::prelude::*;
Expand Down Expand Up @@ -242,7 +242,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" }

### Reducing Depending Libraries && Turning Off Backends
Plotters now supports use features to control the backend dependencies. By default, `BitMapBackend` and `SVGBackend` are supported,
use `default_features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations.
use `default-features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations.

- `svg` Enable the `SVGBackend`
- `bitmap` Enable the `BitMapBackend`
Expand All @@ -251,16 +251,16 @@ For example, the following dependency description would avoid compiling with bit

```toml
[dependencies]
plotters = { git = "https://github.com/plotters-rs/plotters.git", default_features = false, features = ["svg"] }
plotters = { git = "https://github.com/plotters-rs/plotters.git", default-features = false, features = ["svg"] }
```

The library also allows consumers to make use of the [`Palette`](https://crates.io/crates/palette/) crate's color types by default.
This behavior can also be turned off by setting `default_features = false`.
This behavior can also be turned off by setting `default-features = false`.

### List of Features

This is the full list of features that is defined by `Plotters` crate.
Use `default_features = false` to disable those default enabled features,
Use `default-features = false` to disable those default enabled features,
and then you should be able to cherry-pick what features you want to include into `Plotters` crate.
By doing so, you can minimize the number of dependencies down to only `itertools` and compile time is less than 6s.

Expand Down
2 changes: 1 addition & 1 deletion plotters-bitmap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ image_encoder = ["image"]
gif_backend = ["gif", "image_encoder"]

[dev-dependencies.plotters]
default_features = false
default-features = false
features = ["ttf", "line_series", "bitmap_backend"]
path = "../plotters"

Expand Down
2 changes: 1 addition & 1 deletion plotters-svg/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ debug = []
bitmap_encoder = ["image"]

[dev-dependencies.plotters]
default_features = false
default-features = false
features = ["ttf"]
path = "../plotters"
2 changes: 1 addition & 1 deletion plotters/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ path = "../plotters-backend"

[dependencies.plotters-bitmap]
version = "0.3.6"
default_features = false
default-features = false
optional = true
path = "../plotters-bitmap"

Expand Down
10 changes: 5 additions & 5 deletions plotters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ The feature `evcxr` should be enabled when including Plotters to Jupyter Noteboo
The following code shows a minimal example of this.
```text
:dep plotters = { version = "^0.3.6", default_features = false, features = ["evcxr", "all_series", "all_elements"] }
:dep plotters = { version = "^0.3.6", default-features = false, features = ["evcxr", "all_series", "all_elements"] }
extern crate plotters;
use plotters::prelude::*;
Expand Down Expand Up @@ -640,7 +640,7 @@ plotters = { git = "https://github.com/plotters-rs/plotters.git" }
### Reducing Depending Libraries && Turning Off Backends
Plotters now supports use features to control the backend dependencies. By default, `BitMapBackend` and `SVGBackend` are supported,
use `default_features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations.
use `default-features = false` in the dependency description in `Cargo.toml` and you can cherry-pick the backend implementations.
- `svg` Enable the `SVGBackend`
- `bitmap` Enable the `BitMapBackend`
Expand All @@ -649,16 +649,16 @@ For example, the following dependency description would avoid compiling with bit
```toml
[dependencies]
plotters = { git = "https://github.com/plotters-rs/plotters.git", default_features = false, features = ["svg"] }
plotters = { git = "https://github.com/plotters-rs/plotters.git", default-features = false, features = ["svg"] }
```
The library also allows consumers to make use of the [`Palette`](https://crates.io/crates/palette/) crate's color types by default.
This behavior can also be turned off by setting `default_features = false`.
This behavior can also be turned off by setting `default-features = false`.
### List of Features
This is the full list of features that is defined by `Plotters` crate.
Use `default_features = false` to disable those default enabled features,
Use `default-features = false` to disable those default enabled features,
and then you should be able to cherry-pick what features you want to include into `Plotters` crate.
By doing so, you can minimize the number of dependencies down to only `itertools` and compile time is less than 6s.
Expand Down

0 comments on commit 87b286f

Please sign in to comment.