Skip to content

Commit

Permalink
box single legend variant
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Dec 19, 2024
1 parent c1bdc51 commit 4f1dc10
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charming/src/component/legend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ use crate::{
#[derive(Debug, PartialEq, Serialize, Clone)]
#[serde(untagged)]
pub enum LegendConfig {
Single(Legend),
Single(Box<Legend>),
Multiple(Vec<Legend>),
}

impl From<Legend> for LegendConfig {
fn from(legend: Legend) -> Self {
LegendConfig::Single(legend)
Self::Single(Box::new(legend))
}
}

Expand Down

0 comments on commit 4f1dc10

Please sign in to comment.