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,13 +54,14 @@ impl PriceInterval {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn to_candlestick_data(&self) -> Option<CandlestickData> {
|
pub fn to_candlestick_data(&self) -> Option<CandlestickData> {
|
||||||
if self.transaction_count == 0 || self.open.is_none() || self.close.is_none() {
|
if self.transaction_count == 0 {
|
||||||
None
|
return None;
|
||||||
} else {
|
}
|
||||||
|
|
||||||
Some(CandlestickData {
|
Some(CandlestickData {
|
||||||
time: self.start,
|
time: self.start,
|
||||||
open: self.open.unwrap(),
|
open: self.open?,
|
||||||
close: self.close.unwrap(),
|
close: self.close?,
|
||||||
high: self.high,
|
high: self.high,
|
||||||
low: self.low,
|
low: self.low,
|
||||||
volume_sats: self.volume_sats,
|
volume_sats: self.volume_sats,
|
||||||
|
|
@ -68,7 +69,6 @@ impl PriceInterval {
|
||||||
transaction_count: self.transaction_count,
|
transaction_count: self.transaction_count,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pub fn end(&self) -> i64 {
|
pub fn end(&self) -> i64 {
|
||||||
self.start + self.step
|
self.start + self.step
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue