Skip to content

Commit

Permalink
fix: Use internally tagged serde attribute for IndexMetric (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
Batch21 authored Jan 20, 2025
1 parent 72f43ed commit 0d2a3b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywr-schema/src/metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ impl EdgeReference {
/// This struct is the integer equivalent of [`Metric`] and is used in places where an integer
/// value is required. See [`Metric`] for more information.
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, JsonSchema, Display, PartialEq)]
#[serde(untagged)]
#[serde(tag = "type")]
pub enum IndexMetric {
Constant {
value: u64,
Expand Down

0 comments on commit 0d2a3b1

Please sign in to comment.