WIP adding cbor stream test

This commit is contained in:
Dominik Werder
2023-12-18 15:53:33 +01:00
parent 31afee0893
commit a8479b2c8d
16 changed files with 407 additions and 175 deletions

View File

@@ -2946,6 +2946,12 @@ impl From<SfChFetchInfo> for ChannelTypeConfigGen {
}
}
impl From<ChConf> for ChannelTypeConfigGen {
fn from(value: ChConf) -> Self {
Self::Scylla(value)
}
}
pub fn f32_close(a: f32, b: f32) -> bool {
if (a - b).abs() < 1e-4 || (a / b > 0.999 && a / b < 1.001) {
true

View File

@@ -53,8 +53,8 @@ impl fmt::Debug for NanoRange {
impl NanoRange {
pub fn from_date_time(beg: DateTime<Utc>, end: DateTime<Utc>) -> Self {
Self {
beg: beg.timestamp_nanos() as u64,
end: end.timestamp_nanos() as u64,
beg: beg.timestamp_nanos_opt().unwrap_or(0) as u64,
end: end.timestamp_nanos_opt().unwrap_or(0) as u64,
}
}