Clippy issue on new rust version

This commit is contained in:
Dagur Valberg Johannsson 2026-02-02 11:59:08 +01:00
parent 0388aa282e
commit 98a6d1a0bb
No known key found for this signature in database
GPG key ID: FD701804AEE88107

View file

@ -54,13 +54,14 @@ 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 {
if self.transaction_count == 0 {
return None;
}
Some(CandlestickData {
time: self.start,
open: self.open.unwrap(),
close: self.close.unwrap(),
open: self.open?,
close: self.close?,
high: self.high,
low: self.low,
volume_sats: self.volume_sats,
@ -68,7 +69,6 @@ impl PriceInterval {
transaction_count: self.transaction_count,
})
}
}
pub fn end(&self) -> i64 {
self.start + self.step