mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-25 07:07:32 -04:00
chore: fix warnings
This commit is contained in:
parent
f5b140a4d9
commit
ac584fb7ef
5 changed files with 8 additions and 25 deletions
|
@ -5,7 +5,6 @@ import 'package:flowy_infra_ui/style_widget/scrolling/styled_list.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';
|
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scroll_bar.dart';
|
||||||
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
|
import 'package:flowy_infra_ui/style_widget/scrolling/styled_scrollview.dart';
|
||||||
import 'package:flowy_infra_ui/widget/error_page.dart';
|
import 'package:flowy_infra_ui/widget/error_page.dart';
|
||||||
import 'package:flowy_sdk/log.dart';
|
|
||||||
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
|
import 'package:flowy_sdk/protobuf/flowy-folder-data-model/view.pb.dart';
|
||||||
import 'package:flowy_sdk/protobuf/flowy-grid-data-model/grid.pb.dart' show Field;
|
import 'package:flowy_sdk/protobuf/flowy-grid-data-model/grid.pb.dart' show Field;
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
|
|
@ -190,11 +190,10 @@ impl std::default::Default for TimeFormat {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
use crate::services::field::DateTypeOption;
|
||||||
use crate::services::field::FieldBuilder;
|
use crate::services::field::FieldBuilder;
|
||||||
use crate::services::field::{DateFormat, DateTypeOption, TimeFormat};
|
use crate::services::row::CellDataOperation;
|
||||||
use crate::services::row::{CellDataOperation, TypeOptionCellData};
|
|
||||||
use flowy_grid_data_model::entities::FieldType;
|
use flowy_grid_data_model::entities::FieldType;
|
||||||
use strum::IntoEnumIterator;
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn date_description_invalid_input_test() {
|
fn date_description_invalid_input_test() {
|
||||||
|
@ -287,7 +286,7 @@ mod tests {
|
||||||
type_option.apply_changeset("he", None).unwrap();
|
type_option.apply_changeset("he", None).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
fn data(s: &str) -> String {
|
// fn data(s: &str) -> String {
|
||||||
TypeOptionCellData::new(s, FieldType::DateTime).json()
|
// TypeOptionCellData::new(s, FieldType::DateTime).json()
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,10 +65,6 @@ impl CellDataOperation for RichTextTypeOption {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::services::field::FieldBuilder;
|
|
||||||
use crate::services::field::*;
|
|
||||||
use crate::services::row::{CellDataOperation, TypeOptionCellData};
|
|
||||||
use flowy_grid_data_model::entities::FieldType;
|
|
||||||
|
|
||||||
// #[test]
|
// #[test]
|
||||||
// fn text_description_test() {
|
// fn text_description_test() {
|
||||||
|
|
|
@ -19,7 +19,7 @@ pub fn create_default_workspace() -> Workspace {
|
||||||
};
|
};
|
||||||
|
|
||||||
Workspace {
|
Workspace {
|
||||||
id: workspace_id.to_string(),
|
id: workspace_id,
|
||||||
name,
|
name,
|
||||||
desc,
|
desc,
|
||||||
apps,
|
apps,
|
||||||
|
@ -38,7 +38,7 @@ fn create_default_app(workspace_id: String, time: chrono::DateTime<Utc>) -> App
|
||||||
};
|
};
|
||||||
|
|
||||||
App {
|
App {
|
||||||
id: app_id.to_string(),
|
id: app_id,
|
||||||
workspace_id,
|
workspace_id,
|
||||||
name,
|
name,
|
||||||
desc,
|
desc,
|
||||||
|
@ -56,7 +56,7 @@ fn create_default_view(app_id: String, time: chrono::DateTime<Utc>) -> View {
|
||||||
let data_type = ViewDataType::TextBlock;
|
let data_type = ViewDataType::TextBlock;
|
||||||
|
|
||||||
View {
|
View {
|
||||||
id: view_id.to_string(),
|
id: view_id,
|
||||||
belong_to_id: app_id,
|
belong_to_id: app_id,
|
||||||
name,
|
name,
|
||||||
desc,
|
desc,
|
||||||
|
|
|
@ -12,14 +12,3 @@ fn grid_default_serde_test() {
|
||||||
let json = serde_json::to_string(&grid).unwrap();
|
let json = serde_json::to_string(&grid).unwrap();
|
||||||
assert_eq!(json, r#"{"grid_id":"1","fields":[],"blocks":[]}"#)
|
assert_eq!(json, r#"{"grid_id":"1","fields":[],"blocks":[]}"#)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn create_field(field_id: &str) -> FieldMeta {
|
|
||||||
let mut field = FieldMeta::new("Text Field", "", FieldType::RichText);
|
|
||||||
field.id = field_id.to_string();
|
|
||||||
field
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(dead_code)]
|
|
||||||
fn uuid() -> String {
|
|
||||||
uuid::Uuid::new_v4().to_string()
|
|
||||||
}
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue