Skip to content

Commit 15da486

Browse files
committed
feat: Use map_or
1 parent 23aa689 commit 15da486

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

datafusion/common/src/stats.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -320,10 +320,7 @@ impl Precision<ScalarValue> {
320320

321321
impl<T: Debug + Clone + PartialEq + Eq + PartialOrd> From<Option<T>> for Precision<T> {
322322
fn from(option: Option<T>) -> Self {
323-
match option {
324-
Some(value) => Precision::Exact(value),
325-
None => Precision::Absent,
326-
}
323+
option.map_or(Precision::Absent, Precision::Exact)
327324
}
328325
}
329326

0 commit comments

Comments
 (0)