Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

fix: rust unit test

appflowy481fd9df5143
diff --git a/frontend/app_flowy/lib/workspace/application/grid/cell/cell_service/context_builder.dart b/frontend/app_flowy/lib/workspace/application/grid/cell/cell_service/context_builder.dart
index b554f03556..3041c563d9 100644
--- a/frontend/app_flowy/lib/workspace/application/grid/cell/cell_service/context_builder.dart
+++ b/frontend/app_flowy/lib/workspace/application/grid/cell/cell_service/context_builder.dart
@@ -219,6 +219,7 @@ class _GridCellContext<T, D> extends Equatable {
}
void dispose() {
+ _cellListener.stop();
_loadDataOperation?.cancel();
_saveDataOperation?.cancel();
diff --git a/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option.rs b/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option.rs
index 891eb2f336..f91fc8bb48 100644
--- a/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option.rs
+++ b/frontend/rust-lib/flowy-grid/src/services/field/type_options/date_type_option.rs
@@ -358,7 +358,7 @@ impl std::convert::From<DateCellContentChangeset> for CellContentChangeset {
mod tests {
use crate::services::field::FieldBuilder;
use crate::services::field::{DateCellContentChangeset, DateCellData, DateFormat, DateTypeOption, TimeFormat};
- use crate::services::row::{CellDataOperation, EncodedCellData};
+ use crate::services::row::CellDataOperation;
use flowy_grid_data_model::entities::{FieldMeta, FieldType, TypeOptionDataEntry};
use strum::IntoEnumIterator;
diff --git a/frontend/rust-lib/flowy-grid/src/services/field/type_options/text_type_option.rs b/frontend/rust-lib/flowy-grid/src/services/field/type_options/text_type_option.rs
index 029d476533..b59681a2ea 100644
--- a/frontend/rust-lib/flowy-grid/src/services/field/type_options/text_type_option.rs
+++ b/frontend/rust-lib/flowy-grid/src/services/field/type_options/text_type_option.rs
@@ -80,10 +80,10 @@ mod tests {
// date
let field_type = FieldType::DateTime;
let date_time_field_meta = FieldBuilder::from_field_type(&field_type).build();
- let json = serde_json::to_string(&DateCellDataSerde::new(1647251762, None)).unwrap();
+
assert_eq!(
type_option
- .decode_cell_data(json, &field_type, &date_time_field_meta)
+ .decode_cell_data(1647251762.to_string(), &field_type, &date_time_field_meta)
.unwrap()
.parse::<DateCellData>()
.unwrap()