Skip to content

Commit

Permalink
docs: Fix features in adding-a-parameter listing.
Browse files Browse the repository at this point in the history
  • Loading branch information
jetuk committed Aug 6, 2024
1 parent 5aafe40 commit 987f29b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pywr-book/listings/adding-a-parameter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@ pywr-schema = { path = "../../../pywr-schema" }
pywr-schema-macros = { path = "../../../pywr-schema-macros" }
serde = { workspace = true }
schemars = { workspace = true }

[features]
core = ["pywr-schema/core"]
default = ["core"]
4 changes: 4 additions & 0 deletions pywr-book/listings/adding-a-parameter/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,12 @@ impl GeneralParameter<f64> for MaxParameter {

// ANCHOR_END: impl-parameter
mod schema {
#[cfg(feature = "core")]
use pywr_core::parameters::ParameterIndex;
use pywr_schema::metric::Metric;
use pywr_schema::parameters::ParameterMeta;
#[cfg(feature = "core")]
use pywr_schema::{model::LoadArgs, SchemaError};
use schemars::JsonSchema;

// ANCHOR: schema
Expand Down

0 comments on commit 987f29b

Please sign in to comment.