mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: support Rust 1.75 (#4246)
* chore: fix wanrings * chore: update rust version
This commit is contained in:
@ -1304,12 +1304,7 @@ impl DatabaseViewOperation for DatabaseViewOperationImpl {
|
||||
if let (Some(database), Some(editor_by_view_id)) =
|
||||
(weak_database.upgrade(), weak_editor_by_view_id.upgrade())
|
||||
{
|
||||
let view_editors = editor_by_view_id
|
||||
.read()
|
||||
.await
|
||||
.values()
|
||||
.map(|editor| editor.clone())
|
||||
.collect();
|
||||
let view_editors = editor_by_view_id.read().await.values().cloned().collect();
|
||||
let _ =
|
||||
update_field_type_option_fn(&database, &view_editors, type_option_data, old_field).await;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ mod select_type_option;
|
||||
mod single_select_type_option;
|
||||
mod type_option_transform;
|
||||
|
||||
pub use checklist_filter::*;
|
||||
pub use multi_select_type_option::*;
|
||||
pub use select_ids::*;
|
||||
pub use select_option::*;
|
||||
|
@ -280,6 +280,6 @@ pub fn default_type_option_data_from_type(field_type: &FieldType) -> TypeOptionD
|
||||
FieldType::MultiSelect => MultiSelectTypeOption::default().into(),
|
||||
FieldType::Checkbox => CheckboxTypeOption::default().into(),
|
||||
FieldType::URL => URLTypeOption::default().into(),
|
||||
FieldType::Checklist => ChecklistTypeOption::default().into(),
|
||||
FieldType::Checklist => ChecklistTypeOption.into(),
|
||||
}
|
||||
}
|
||||
|
@ -369,9 +369,7 @@ fn filter_row(
|
||||
cell_filter_cache: &CellFilterCache,
|
||||
) -> Option<(RowId, bool)> {
|
||||
// Create a filter result cache if it's not exist
|
||||
let mut filter_result = result_by_row_id
|
||||
.entry(row.id.clone())
|
||||
.or_insert_with(FilterResult::default);
|
||||
let mut filter_result = result_by_row_id.entry(row.id.clone()).or_default();
|
||||
let old_is_visible = filter_result.is_visible();
|
||||
|
||||
// Iterate each cell of the row to check its visibility
|
||||
|
@ -115,14 +115,14 @@ where
|
||||
let no_status_group_rows = other_group_changesets
|
||||
.iter()
|
||||
.flat_map(|changeset| &changeset.deleted_rows)
|
||||
.cloned()
|
||||
.filter(|row_id| {
|
||||
.filter(|&row_id| {
|
||||
// if the [other_group_inserted_row] contains the row_id of the row
|
||||
// which means the row should not move to the default group.
|
||||
!other_group_inserted_row
|
||||
.iter()
|
||||
.any(|inserted_row| &inserted_row.row_meta.id == row_id)
|
||||
})
|
||||
.cloned()
|
||||
.collect::<Vec<String>>();
|
||||
|
||||
let mut changeset = GroupRowsNotificationPB::new(no_status_group.id.clone());
|
||||
|
@ -223,10 +223,8 @@ impl GroupCustomize for DateGroupController {
|
||||
deleted_group = Some(GroupPB::from(group.clone()));
|
||||
}
|
||||
}
|
||||
if deleted_group.is_some() {
|
||||
let _ = self
|
||||
.context
|
||||
.delete_group(&deleted_group.as_ref().unwrap().group_id);
|
||||
if let Some(delete_group) = deleted_group.as_ref() {
|
||||
let _ = self.context.delete_group(&delete_group.group_id);
|
||||
}
|
||||
deleted_group
|
||||
}
|
||||
|
@ -179,10 +179,8 @@ impl GroupCustomize for URLGroupController {
|
||||
deleted_group = Some(GroupPB::from(group.clone()));
|
||||
}
|
||||
}
|
||||
if deleted_group.is_some() {
|
||||
let _ = self
|
||||
.context
|
||||
.delete_group(&deleted_group.as_ref().unwrap().group_id);
|
||||
if let Some(deleted_group) = deleted_group.as_ref() {
|
||||
let _ = self.context.delete_group(&deleted_group.group_id);
|
||||
}
|
||||
deleted_group
|
||||
}
|
||||
|
@ -30,9 +30,10 @@ impl TryFrom<SortMap> for Sort {
|
||||
value.get_i64_value(FIELD_TYPE).map(FieldType::from),
|
||||
) {
|
||||
(Some(id), Some(field_id), Some(field_type)) => {
|
||||
let condition =
|
||||
SortCondition::try_from(value.get_i64_value(SORT_CONDITION).unwrap_or_default())
|
||||
.unwrap_or_default();
|
||||
let condition = value
|
||||
.get_i64_value(SORT_CONDITION)
|
||||
.map(SortCondition::from)
|
||||
.unwrap_or_default();
|
||||
Ok(Self {
|
||||
id,
|
||||
field_id,
|
||||
|
Reference in New Issue
Block a user