Skip to content

Commit

Permalink
fix: From<bool> for f64 has been added in 1.68.0
Browse files Browse the repository at this point in the history
Signed-off-by: Luka Peschke <[email protected]>
  • Loading branch information
lukapeschke committed Jan 31, 2024
1 parent 1819b14 commit 440b6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/datatype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ impl DataType for Data {
match self {
Data::Int(v) => Some(*v as f64),
Data::Float(v) => Some(*v),
Data::Bool(v) => Some((*v).into()),
Data::Bool(v) => Some((*v as i32).into()),
Data::String(v) => v.parse::<f64>().ok(),
_ => None,
}
Expand Down Expand Up @@ -463,7 +463,7 @@ impl DataType for DataRef<'_> {
match self {
DataRef::Int(v) => Some(*v as f64),
DataRef::Float(v) => Some(*v),
DataRef::Bool(v) => Some((*v).into()),
DataRef::Bool(v) => Some((*v as i32).into()),
DataRef::String(v) => v.parse::<f64>().ok(),
DataRef::SharedString(v) => v.parse::<f64>().ok(),
_ => None,
Expand Down

0 comments on commit 440b6a8

Please sign in to comment.