Skip to content

Commit fad0476

Browse files
committed
🎨 make candleType private
1 parent e739e6b commit fad0476

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

src/chart.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub struct Candle {
1616
pub timestamp: Option<i64>,
1717
}
1818

19-
pub enum CandleType {
19+
pub(crate) enum CandleType {
2020
Bearish,
2121
Bullish,
2222
}
@@ -41,7 +41,7 @@ impl Candle {
4141
}
4242
}
4343

44-
pub fn get_type(&self) -> CandleType {
44+
pub(crate) fn get_type(&self) -> CandleType {
4545
match self.open < self.close {
4646
true => CandleType::Bullish,
4747
false => CandleType::Bearish,

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ mod volume_pane;
77
mod y_axis;
88

99
pub use chart::Candle;
10-
pub use chart::CandleType;
1110
pub use chart::Chart;

src/volume_pane.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{chart_data::ChartData, Candle, CandleType};
1+
use crate::{chart::CandleType, chart_data::ChartData, Candle};
22
use colored::Colorize;
33
use std::{cell::RefCell, rc::Rc};
44

0 commit comments

Comments
 (0)