mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: decode cell revision into AnyCellData
This commit is contained in:
parent
8fa7a20326
commit
5bfbda5606
@ -74,7 +74,7 @@ struct DateRange {
|
||||
|
||||
impl ToString for DateRange {
|
||||
fn to_string(&self) -> String {
|
||||
serde_json::to_string(self).unwrap_or("".to_string())
|
||||
serde_json::to_string(self).unwrap_or_else(|_| "".to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -45,9 +45,12 @@ impl std::convert::From<Vec<GridFilter>> for RepeatedGridFilter {
|
||||
#[derive(ProtoBuf, Debug, Default, Clone)]
|
||||
pub struct DeleteFilterPayload {
|
||||
#[pb(index = 1)]
|
||||
pub filter_id: String,
|
||||
pub field_id: String,
|
||||
|
||||
#[pb(index = 2)]
|
||||
pub filter_id: String,
|
||||
|
||||
#[pb(index = 3)]
|
||||
pub field_type: FieldType,
|
||||
}
|
||||
|
||||
@ -55,10 +58,14 @@ impl TryInto<DeleteFilterParams> for DeleteFilterPayload {
|
||||
type Error = ErrorCode;
|
||||
|
||||
fn try_into(self) -> Result<DeleteFilterParams, Self::Error> {
|
||||
let field_id = NotEmptyStr::parse(self.field_id)
|
||||
.map_err(|_| ErrorCode::FieldIdIsEmpty)?
|
||||
.0;
|
||||
let filter_id = NotEmptyStr::parse(self.filter_id)
|
||||
.map_err(|_| ErrorCode::UnexpectedEmptyString)?
|
||||
.0;
|
||||
Ok(DeleteFilterParams {
|
||||
field_id,
|
||||
filter_id,
|
||||
field_type_rev: self.field_type.into(),
|
||||
})
|
||||
|
@ -1,11 +1,11 @@
|
||||
use crate::entities::{
|
||||
CreateGridFilterPayload, CreateGridGroupPayload, CreateGridSortPayload, DeleteFilterPayload, GridFilter, GridGroup,
|
||||
GridSort, RepeatedGridFilter, RepeatedGridGroup, RepeatedGridSort,
|
||||
CreateGridFilterPayload, CreateGridGroupPayload, CreateGridSortPayload, DeleteFilterPayload, RepeatedGridFilter,
|
||||
RepeatedGridGroup, RepeatedGridSort,
|
||||
};
|
||||
use flowy_derive::{ProtoBuf, ProtoBuf_Enum};
|
||||
use flowy_error::ErrorCode;
|
||||
use flowy_grid_data_model::parser::NotEmptyStr;
|
||||
use flowy_grid_data_model::revision::{GridLayoutRevision, GridSettingRevision};
|
||||
use flowy_grid_data_model::revision::GridLayoutRevision;
|
||||
use flowy_sync::entities::grid::GridSettingChangesetParams;
|
||||
use std::collections::HashMap;
|
||||
use std::convert::TryInto;
|
||||
|
@ -363,9 +363,16 @@ pub(crate) async fn get_select_option_handler(
|
||||
data_result(SelectOptionCellData::default())
|
||||
}
|
||||
Some(field_rev) => {
|
||||
//
|
||||
let cell_rev = editor.get_cell_rev(¶ms.row_id, ¶ms.field_id).await?;
|
||||
let type_option = select_option_operation(&field_rev)?;
|
||||
let any_cell_data: AnyCellData = cell_rev.try_into()?;
|
||||
let any_cell_data: AnyCellData = match cell_rev {
|
||||
None => AnyCellData {
|
||||
data: "".to_string(),
|
||||
field_type: field_rev.field_type_rev.clone().into(),
|
||||
},
|
||||
Some(cell_rev) => cell_rev.try_into()?,
|
||||
};
|
||||
let option_context = type_option.selected_select_option(any_cell_data);
|
||||
data_result(option_context)
|
||||
}
|
||||
|
@ -9,7 +9,7 @@ use std::str::FromStr;
|
||||
/// So it will return an empty data. You could check the CellDataOperation trait for more information.
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct AnyCellData {
|
||||
pub cell_data: String,
|
||||
pub data: String,
|
||||
pub field_type: FieldType,
|
||||
}
|
||||
|
||||
@ -38,21 +38,10 @@ impl std::convert::TryFrom<&CellRevision> for AnyCellData {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom<&Option<CellRevision>> for AnyCellData {
|
||||
impl std::convert::TryFrom<CellRevision> for AnyCellData {
|
||||
type Error = FlowyError;
|
||||
|
||||
fn try_from(value: &Option<CellRevision>) -> Result<Self, Self::Error> {
|
||||
match value {
|
||||
None => Err(FlowyError::invalid_data().context("Expected CellRevision, but receive None")),
|
||||
Some(cell_rev) => AnyCellData::try_from(cell_rev),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl std::convert::TryFrom<Option<CellRevision>> for AnyCellData {
|
||||
type Error = FlowyError;
|
||||
|
||||
fn try_from(value: Option<CellRevision>) -> Result<Self, Self::Error> {
|
||||
fn try_from(value: CellRevision) -> Result<Self, Self::Error> {
|
||||
Self::try_from(&value)
|
||||
}
|
||||
}
|
||||
@ -60,7 +49,7 @@ impl std::convert::TryFrom<Option<CellRevision>> for AnyCellData {
|
||||
impl AnyCellData {
|
||||
pub fn new(content: String, field_type: FieldType) -> Self {
|
||||
AnyCellData {
|
||||
cell_data: content,
|
||||
data: content,
|
||||
field_type,
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,10 @@ pub fn apply_cell_data_changeset<C: ToString, T: AsRef<FieldRevision>>(
|
||||
|
||||
pub fn decode_any_cell_data<T: TryInto<AnyCellData>>(data: T, field_rev: &FieldRevision) -> DecodedCellData {
|
||||
if let Ok(any_cell_data) = data.try_into() {
|
||||
let AnyCellData { cell_data, field_type } = any_cell_data;
|
||||
let AnyCellData {
|
||||
data: cell_data,
|
||||
field_type,
|
||||
} = any_cell_data;
|
||||
let to_field_type = field_rev.field_type_rev.into();
|
||||
match try_decode_cell_data(CellData(Some(cell_data)), field_rev, &field_type, &to_field_type) {
|
||||
Ok(cell_data) => cell_data,
|
||||
|
@ -65,7 +65,7 @@ pub fn make_selected_select_options<T: TryInto<AnyCellData>>(
|
||||
options: &[SelectOption],
|
||||
) -> Vec<SelectOption> {
|
||||
if let Ok(type_option_cell_data) = any_cell_data.try_into() {
|
||||
let ids = SelectOptionIds::from(type_option_cell_data.cell_data);
|
||||
let ids = SelectOptionIds::from(type_option_cell_data.data);
|
||||
ids.iter()
|
||||
.flat_map(|option_id| options.iter().find(|option| &option.id == option_id).cloned())
|
||||
.collect()
|
||||
@ -151,7 +151,7 @@ impl std::convert::TryFrom<AnyCellData> for SelectOptionIds {
|
||||
type Error = FlowyError;
|
||||
|
||||
fn try_from(value: AnyCellData) -> Result<Self, Self::Error> {
|
||||
Ok(Self::from(value.cell_data))
|
||||
Ok(Self::from(value.data))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ impl FromCellString for DateTimestamp {
|
||||
|
||||
impl std::convert::From<AnyCellData> for DateTimestamp {
|
||||
fn from(data: AnyCellData) -> Self {
|
||||
let num = data.cell_data.parse::<i64>().unwrap_or(0);
|
||||
let num = data.data.parse::<i64>().unwrap_or(0);
|
||||
DateTimestamp(num)
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ impl std::convert::TryFrom<AnyCellData> for TextCellData {
|
||||
type Error = FlowyError;
|
||||
|
||||
fn try_from(value: AnyCellData) -> Result<Self, Self::Error> {
|
||||
Ok(TextCellData(value.cell_data))
|
||||
Ok(TextCellData(value.data))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -114,7 +114,7 @@ impl std::convert::TryFrom<AnyCellData> for URLCellData {
|
||||
type Error = FlowyError;
|
||||
|
||||
fn try_from(data: AnyCellData) -> Result<Self, Self::Error> {
|
||||
serde_json::from_str::<URLCellData>(&data.cell_data).map_err(internal_error)
|
||||
serde_json::from_str::<URLCellData>(&data.data).map_err(internal_error)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4,7 +4,7 @@ use std::str::FromStr;
|
||||
|
||||
pub fn get_cell_data(cell_rev: &CellRevision) -> String {
|
||||
match AnyCellData::from_str(&cell_rev.data) {
|
||||
Ok(type_option) => type_option.cell_data,
|
||||
Ok(type_option) => type_option.data,
|
||||
Err(_) => String::new(),
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ impl GridDateFilter {
|
||||
false
|
||||
}
|
||||
}
|
||||
DateFilterCondition::DateIsEmpty => cell_timestamp == (0 as i64),
|
||||
DateFilterCondition::DateIsEmpty => cell_timestamp == 0_i64,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ impl CellFilterOperation<GridNumberFilter> for NumberTypeOption {
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
let cell_data = any_cell_data.cell_data;
|
||||
let cell_data = any_cell_data.data;
|
||||
let num_cell_data = self.format_cell_data(&cell_data)?;
|
||||
|
||||
Ok(filter.is_visible(&num_cell_data))
|
||||
|
@ -43,38 +43,32 @@ impl GridSettingChangesetBuilder {
|
||||
pub fn make_grid_setting(grid_setting_rev: &GridSettingRevision, field_revs: &[Arc<FieldRevision>]) -> GridSetting {
|
||||
let current_layout_type: GridLayoutType = grid_setting_rev.layout.clone().into();
|
||||
let filters_by_field_id = grid_setting_rev
|
||||
.get_all_filter(&field_revs)
|
||||
.and_then(|filters_by_field_id| {
|
||||
Some(
|
||||
filters_by_field_id
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, v.into()))
|
||||
.collect::<HashMap<String, RepeatedGridFilter>>(),
|
||||
)
|
||||
.get_all_filter(field_revs)
|
||||
.map(|filters_by_field_id| {
|
||||
filters_by_field_id
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, v.into()))
|
||||
.collect::<HashMap<String, RepeatedGridFilter>>()
|
||||
})
|
||||
.unwrap_or(HashMap::default());
|
||||
.unwrap_or_default();
|
||||
let groups_by_field_id = grid_setting_rev
|
||||
.get_all_group()
|
||||
.and_then(|groups_by_field_id| {
|
||||
Some(
|
||||
groups_by_field_id
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, v.into()))
|
||||
.collect::<HashMap<String, RepeatedGridGroup>>(),
|
||||
)
|
||||
.map(|groups_by_field_id| {
|
||||
groups_by_field_id
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, v.into()))
|
||||
.collect::<HashMap<String, RepeatedGridGroup>>()
|
||||
})
|
||||
.unwrap_or(HashMap::default());
|
||||
.unwrap_or_default();
|
||||
let sorts_by_field_id = grid_setting_rev
|
||||
.get_all_sort()
|
||||
.and_then(|sorts_by_field_id| {
|
||||
Some(
|
||||
sorts_by_field_id
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, v.into()))
|
||||
.collect::<HashMap<String, RepeatedGridSort>>(),
|
||||
)
|
||||
.map(|sorts_by_field_id| {
|
||||
sorts_by_field_id
|
||||
.into_iter()
|
||||
.map(|(k, v)| (k, v.into()))
|
||||
.collect::<HashMap<String, RepeatedGridSort>>()
|
||||
})
|
||||
.unwrap_or(HashMap::default());
|
||||
.unwrap_or_default();
|
||||
|
||||
GridSetting {
|
||||
layouts: GridLayout::all(),
|
||||
|
@ -1,2 +1,2 @@
|
||||
mod script;
|
||||
mod test;
|
||||
mod text_filter_test;
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
use flowy_grid::entities::{CreateGridFilterPayload, GridLayoutType, GridSetting};
|
||||
use flowy_grid::services::setting::GridSettingChangesetBuilder;
|
||||
use flowy_grid_data_model::revision::FieldTypeRevision;
|
||||
use flowy_grid_data_model::revision::{FieldRevision, FieldTypeRevision};
|
||||
use flowy_sync::entities::grid::{CreateGridFilterParams, DeleteFilterParams, GridSettingChangesetParams};
|
||||
use crate::grid::script::GridEditorTest;
|
||||
|
||||
@ -22,7 +22,7 @@ pub enum FilterScript {
|
||||
},
|
||||
DeleteGridTableFilter {
|
||||
filter_id: String,
|
||||
field_type_rev: FieldTypeRevision,
|
||||
field_rev: FieldRevision,
|
||||
},
|
||||
#[allow(dead_code)]
|
||||
AssertGridSetting {
|
||||
@ -67,10 +67,10 @@ impl GridFilterTest {
|
||||
let filters = self.editor.get_grid_filter(&layout_type).await.unwrap();
|
||||
assert_eq!(count as usize, filters.len());
|
||||
}
|
||||
FilterScript::DeleteGridTableFilter { filter_id ,field_type_rev} => {
|
||||
FilterScript::DeleteGridTableFilter { filter_id, field_rev} => {
|
||||
let layout_type = GridLayoutType::Table;
|
||||
let params = GridSettingChangesetBuilder::new(&self.grid_id, &layout_type)
|
||||
.delete_filter(DeleteFilterParams { filter_id, field_type_rev })
|
||||
.delete_filter(DeleteFilterParams { field_id: field_rev.id, filter_id, field_type_rev: field_rev.field_type_rev })
|
||||
.build();
|
||||
let _ = self.editor.update_grid_setting(params).await.unwrap();
|
||||
}
|
||||
|
@ -16,9 +16,10 @@ async fn grid_filter_create_test() {
|
||||
#[should_panic]
|
||||
async fn grid_filter_invalid_condition_panic_test() {
|
||||
let mut test = GridFilterTest::new().await;
|
||||
let field_rev = test.text_field().clone();
|
||||
|
||||
// 100 is not a valid condition, so this test should be panic.
|
||||
let payload = create_filter(&test, "abc");
|
||||
let payload = CreateGridFilterPayload::new(&field_rev, 100, Some("".to_owned()));
|
||||
let scripts = vec![InsertGridTableFilter { payload }];
|
||||
test.run_scripts(scripts).await;
|
||||
}
|
||||
@ -26,16 +27,16 @@ async fn grid_filter_invalid_condition_panic_test() {
|
||||
#[tokio::test]
|
||||
async fn grid_filter_delete_test() {
|
||||
let mut test = GridFilterTest::new().await;
|
||||
let payload = create_filter(&test, "abc");
|
||||
let field_rev = test.text_field().clone();
|
||||
let payload = create_filter(&field_rev, TextFilterCondition::TextIsEmpty, "abc");
|
||||
let scripts = vec![InsertGridTableFilter { payload }, AssertTableFilterCount { count: 1 }];
|
||||
test.run_scripts(scripts).await;
|
||||
|
||||
let filter = test.grid_filters().await.pop().unwrap();
|
||||
|
||||
test.run_scripts(vec![
|
||||
DeleteGridTableFilter {
|
||||
filter_id: filter.id,
|
||||
field_type_rev: field_rev.field_type_rev.clone(),
|
||||
field_rev,
|
||||
},
|
||||
AssertTableFilterCount { count: 0 },
|
||||
])
|
||||
@ -45,7 +46,6 @@ async fn grid_filter_delete_test() {
|
||||
#[tokio::test]
|
||||
async fn grid_filter_get_rows_test() {}
|
||||
|
||||
fn create_filter(grid_filter_test: &GridFilterTest, s: &str) -> CreateGridFilterPayload {
|
||||
let field_rev = grid_filter_test.text_field();
|
||||
CreateGridFilterPayload::new(&field_rev, TextFilterCondition::TextIsEmpty, Some(s.to_owned()))
|
||||
fn create_filter(field_rev: &FieldRevision, condition: TextFilterCondition, s: &str) -> CreateGridFilterPayload {
|
||||
CreateGridFilterPayload::new(field_rev, condition, Some(s.to_owned()))
|
||||
}
|
@ -1,16 +1,19 @@
|
||||
#![cfg_attr(rustfmt, rustfmt::skip)]
|
||||
#![allow(clippy::all)]
|
||||
#![allow(dead_code)]
|
||||
#![allow(unused_imports)]
|
||||
use bytes::Bytes;
|
||||
use flowy_grid::entities::*;
|
||||
use flowy_grid::services::field::select_option::SelectOption;
|
||||
use flowy_grid::services::field::*;
|
||||
use flowy_grid::services::grid_editor::{GridPadBuilder, GridRevisionEditor};
|
||||
use flowy_grid::services::row::CreateRowRevisionPayload;
|
||||
use flowy_grid::services::setting::GridSettingChangesetBuilder;
|
||||
use flowy_grid::entities::*;
|
||||
use flowy_grid_data_model::revision::*;
|
||||
use flowy_revision::REVISION_WRITE_INTERVAL_IN_MILLIS;
|
||||
use flowy_sync::client_grid::GridBuilder;
|
||||
use flowy_sync::entities::grid::{
|
||||
CreateGridFilterParams, DeleteFilterParams, FieldChangesetParams, GridSettingChangesetParams,
|
||||
};
|
||||
use flowy_test::helper::ViewTest;
|
||||
use flowy_test::FlowySDKTest;
|
||||
use std::collections::HashMap;
|
||||
@ -18,8 +21,6 @@ use std::sync::Arc;
|
||||
use std::time::Duration;
|
||||
use strum::EnumCount;
|
||||
use tokio::time::sleep;
|
||||
use flowy_grid::services::field::select_option::SelectOption;
|
||||
use flowy_sync::entities::grid::{CreateGridFilterParams, DeleteFilterParams, FieldChangesetParams, GridSettingChangesetParams};
|
||||
|
||||
pub enum EditorScript {
|
||||
CreateField {
|
||||
@ -82,7 +83,7 @@ pub enum EditorScript {
|
||||
},
|
||||
DeleteGridTableFilter {
|
||||
filter_id: String,
|
||||
field_type_rev: FieldTypeRevision,
|
||||
field_rev: FieldRevision,
|
||||
},
|
||||
#[allow(dead_code)]
|
||||
AssertGridSetting {
|
||||
@ -170,10 +171,7 @@ impl GridEditorTest {
|
||||
assert_eq!(self.field_count, self.field_revs.len());
|
||||
}
|
||||
EditorScript::AssertFieldCount(count) => {
|
||||
assert_eq!(
|
||||
self.editor.get_field_revs(None).await.unwrap().len(),
|
||||
count
|
||||
);
|
||||
assert_eq!(self.editor.get_field_revs(None).await.unwrap().len(), count);
|
||||
}
|
||||
EditorScript::AssertFieldEqual { field_index, field_rev } => {
|
||||
let field_revs = self.editor.get_field_revs(None).await.unwrap();
|
||||
@ -204,14 +202,16 @@ impl GridEditorTest {
|
||||
}
|
||||
EditorScript::CreateEmptyRow => {
|
||||
let row_order = self.editor.create_row(None).await.unwrap();
|
||||
self.row_order_by_row_id.insert(row_order.row_id().to_owned(), row_order);
|
||||
self.row_order_by_row_id
|
||||
.insert(row_order.row_id().to_owned(), row_order);
|
||||
self.row_revs = self.get_row_revs().await;
|
||||
self.block_meta_revs = self.editor.get_block_meta_revs().await.unwrap();
|
||||
}
|
||||
EditorScript::CreateRow { payload: context } => {
|
||||
let row_orders = self.editor.insert_rows(vec![context]).await.unwrap();
|
||||
for row_order in row_orders {
|
||||
self.row_order_by_row_id.insert(row_order.row_id().to_owned(), row_order);
|
||||
self.row_order_by_row_id
|
||||
.insert(row_order.row_id().to_owned(), row_order);
|
||||
}
|
||||
self.row_revs = self.get_row_revs().await;
|
||||
self.block_meta_revs = self.editor.get_block_meta_revs().await.unwrap();
|
||||
@ -271,10 +271,14 @@ impl GridEditorTest {
|
||||
let filters = self.editor.get_grid_filter(&layout_type).await.unwrap();
|
||||
assert_eq!(count as usize, filters.len());
|
||||
}
|
||||
EditorScript::DeleteGridTableFilter { filter_id ,field_type_rev} => {
|
||||
EditorScript::DeleteGridTableFilter { filter_id, field_rev } => {
|
||||
let layout_type = GridLayoutType::Table;
|
||||
let params = GridSettingChangesetBuilder::new(&self.grid_id, &layout_type)
|
||||
.delete_filter(DeleteFilterParams { filter_id, field_type_rev })
|
||||
.delete_filter(DeleteFilterParams {
|
||||
field_id: field_rev.id,
|
||||
filter_id,
|
||||
field_type_rev: field_rev.field_type_rev,
|
||||
})
|
||||
.build();
|
||||
let _ = self.editor.update_grid_setting(params).await.unwrap();
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ impl GridSettingRevision {
|
||||
Some(filters_by_field_id)
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
fn get_filter_rev_map(&self, layout: &GridLayoutRevision, field_id: &str) -> Option<&GridFilterRevisionMap> {
|
||||
let filter_rev_map_by_field_id = self.filters.get(layout)?;
|
||||
filter_rev_map_by_field_id.get(field_id)
|
||||
|
@ -360,7 +360,7 @@ impl GridRevisionPad {
|
||||
// Only return the filters for the current fields' type.
|
||||
let field_id = &field_rev.id;
|
||||
let field_type_rev = &field_rev.field_type_rev;
|
||||
if let Some(mut t_filter_revs) = self.grid_rev.setting.get_filters(layout_ty, field_id, &field_type_rev)
|
||||
if let Some(mut t_filter_revs) = self.grid_rev.setting.get_filters(layout_ty, field_id, field_type_rev)
|
||||
{
|
||||
filter_revs.append(&mut t_filter_revs);
|
||||
}
|
||||
@ -395,7 +395,7 @@ impl GridRevisionPad {
|
||||
if let Some(params) = changeset.delete_filter {
|
||||
match grid_rev
|
||||
.setting
|
||||
.get_mut_filters(&layout_rev, ¶ms.filter_id, ¶ms.field_type_rev)
|
||||
.get_mut_filters(&layout_rev, ¶ms.field_id, ¶ms.field_type_rev)
|
||||
{
|
||||
Some(filters) => {
|
||||
filters.retain(|filter| filter.id != params.filter_id);
|
||||
|
@ -24,6 +24,7 @@ pub struct CreateGridFilterParams {
|
||||
}
|
||||
|
||||
pub struct DeleteFilterParams {
|
||||
pub field_id: String,
|
||||
pub filter_id: String,
|
||||
pub field_type_rev: FieldTypeRevision,
|
||||
}
|
||||
|
@ -114,12 +114,12 @@ fn generate_dart_protobuf_files(
|
||||
check_pb_dart_plugin();
|
||||
let protoc_bin_path = protoc_bin_path.to_str().unwrap().to_owned();
|
||||
paths.iter().for_each(|path| {
|
||||
if cmd_lib::run_cmd! {
|
||||
let result = cmd_lib::run_cmd! {
|
||||
${protoc_bin_path} --dart_out=${output} --proto_path=${proto_file_output_path} ${path}
|
||||
}
|
||||
.is_err()
|
||||
{
|
||||
panic!("Generate dart pb file failed with: {}", path)
|
||||
};
|
||||
|
||||
if result.is_err() {
|
||||
panic!("Generate dart pb file failed with: {}, {:?}", path, result)
|
||||
};
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user