Skip to content

Commit c890c61

Browse files
committed
Merge branch 'zethra-serde-feature'
2 parents 5949216 + 1d10d75 commit c890c61

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ edition = "2021"
1414
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
1515

1616
[dependencies]
17-
serde = { version = "1", features = ["derive"] }
17+
serde = { version = "1", features = ["derive"], optional = true }
1818
terminal_size = "0.1.17"
1919
colored = "2"
2020

src/chart.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use std::{cell::RefCell, rc::Rc};
22

3-
use serde::Deserialize;
4-
53
use crate::{
6-
chart_data::ChartData, chart_renderer::ChartRenderer, info_bar::InfoBar, y_axis::YAxis
4+
chart_data::ChartData, chart_renderer::ChartRenderer, info_bar::InfoBar, y_axis::YAxis,
75
};
86

9-
#[derive(Debug, Deserialize, Clone)]
7+
#[derive(Debug, Clone)]
8+
#[cfg_attr(feature = "serde", derive(serde::Deserialize))]
109
pub struct Candle {
1110
pub open: f64,
1211
pub high: f64,

0 commit comments

Comments
 (0)