Clippy issue on new rust version
This commit is contained in:
parent
0388aa282e
commit
98a6d1a0bb
1 changed files with 13 additions and 13 deletions
|
|
@ -54,20 +54,20 @@ impl PriceInterval {
|
|||
}
|
||||
|
||||
pub fn to_candlestick_data(&self) -> Option<CandlestickData> {
|
||||
if self.transaction_count == 0 || self.open.is_none() || self.close.is_none() {
|
||||
None
|
||||
} else {
|
||||
Some(CandlestickData {
|
||||
time: self.start,
|
||||
open: self.open.unwrap(),
|
||||
close: self.close.unwrap(),
|
||||
high: self.high,
|
||||
low: self.low,
|
||||
volume_sats: self.volume_sats,
|
||||
volume_tokens: self.volume_tokens,
|
||||
transaction_count: self.transaction_count,
|
||||
})
|
||||
if self.transaction_count == 0 {
|
||||
return None;
|
||||
}
|
||||
|
||||
Some(CandlestickData {
|
||||
time: self.start,
|
||||
open: self.open?,
|
||||
close: self.close?,
|
||||
high: self.high,
|
||||
low: self.low,
|
||||
volume_sats: self.volume_sats,
|
||||
volume_tokens: self.volume_tokens,
|
||||
transaction_count: self.transaction_count,
|
||||
})
|
||||
}
|
||||
|
||||
pub fn end(&self) -> i64 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue