From 16bbd248dc06d8c573ba085b793ecea927f96f00 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 31 Jan 2024 02:33:31 +0800 Subject: [PATCH] chore: fix clippy --- .../flowy-database2/src/services/calculations/service.rs | 2 +- .../flowy-database2/src/services/cell/cell_operation.rs | 2 ++ .../type_options/selection_type_option/select_type_option.rs | 5 ++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/frontend/rust-lib/flowy-database2/src/services/calculations/service.rs b/frontend/rust-lib/flowy-database2/src/services/calculations/service.rs index 3a0c40e5883d..76abb05f926c 100644 --- a/frontend/rust-lib/flowy-database2/src/services/calculations/service.rs +++ b/frontend/rust-lib/flowy-database2/src/services/calculations/service.rs @@ -1,5 +1,5 @@ use crate::entities::{CalculationType, FieldType}; -use crate::services::cell::CellDataDecoder; + use crate::services::field::TypeOptionCellExt; use collab_database::fields::Field; use collab_database::rows::RowCell; diff --git a/frontend/rust-lib/flowy-database2/src/services/cell/cell_operation.rs b/frontend/rust-lib/flowy-database2/src/services/cell/cell_operation.rs index 07682f2e009d..1d4d9c051248 100644 --- a/frontend/rust-lib/flowy-database2/src/services/cell/cell_operation.rs +++ b/frontend/rust-lib/flowy-database2/src/services/cell/cell_operation.rs @@ -40,6 +40,8 @@ pub trait CellDataDecoder: TypeOption { /// Same as [CellDataDecoder::stringify_cell_data] but the input parameter is the [Cell] fn stringify_cell(&self, cell: &Cell) -> String; + // Decode the cell into f64 + // Different field type has different way to decode the cell data into f64 fn numeric_cell(&self, cell: &Cell) -> Option; } diff --git a/frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/select_type_option.rs b/frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/select_type_option.rs index f46b764683cf..6f78c808e567 100644 --- a/frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/select_type_option.rs +++ b/frontend/rust-lib/flowy-database2/src/services/field/type_options/selection_type_option/select_type_option.rs @@ -7,14 +7,13 @@ use flowy_error::{internal_error, ErrorCode, FlowyResult}; use crate::entities::{FieldType, SelectOptionCellDataPB}; use crate::services::cell::{ - CellDataChangeset, CellDataDecoder, CellProtobufBlobParser, DecodedCellData, FromCellChangeset, + CellDataDecoder, CellProtobufBlobParser, DecodedCellData, FromCellChangeset, ToCellChangeset, }; use crate::services::field::selection_type_option::type_option_transform::SelectOptionTypeOptionTransformHelper; use crate::services::field::{ make_selected_options, CheckboxCellData, MultiSelectTypeOption, SelectOption, - SelectOptionCellData, SelectOptionColor, SelectOptionIds, SingleSelectTypeOption, TypeOption, - TypeOptionCellDataCompare, TypeOptionCellDataFilter, TypeOptionCellDataSerde, + SelectOptionCellData, SelectOptionColor, SelectOptionIds, SingleSelectTypeOption, TypeOption, TypeOptionCellDataSerde, TypeOptionTransform, SELECTION_IDS_SEPARATOR, };