Skip to content

Commit fa01dbb

Browse files
committed
chore: rename
1 parent 44f9254 commit fa01dbb

File tree

21 files changed

+209
-159
lines changed

21 files changed

+209
-159
lines changed

frontend/rust-lib/Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/rust-lib/flowy-grid/tests/grid/filter_test/checklist_filter_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use crate::grid::filter_test::script::FilterScript::*;
22
use crate::grid::filter_test::script::GridFilterTest;
3-
use flowy_grid::entities::{ChecklistFilterCondition, SelectOptionCondition};
3+
use flowy_grid::entities::ChecklistFilterCondition;
44

55
#[tokio::test]
66
async fn grid_filter_checklist_is_incomplete_test() {

shared-lib/Cargo.lock

Lines changed: 28 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared-lib/flowy-ast/src/ast.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![allow(clippy::all)]
22
#![allow(unused_attributes)]
33
#![allow(unused_assignments)]
4-
use crate::{attr, ty_ext::*, AttrsContainer, Ctxt};
4+
use crate::{attr, ty_ext::*, ASTResult, AttrsContainer};
55
use syn::{self, punctuated::Punctuated};
66

77
pub struct ASTContainer<'a> {
@@ -14,25 +14,25 @@ pub struct ASTContainer<'a> {
1414
}
1515

1616
impl<'a> ASTContainer<'a> {
17-
pub fn from_ast(cx: &Ctxt, ast: &'a syn::DeriveInput) -> Option<ASTContainer<'a>> {
18-
let attrs = AttrsContainer::from_ast(cx, ast);
17+
pub fn from_ast(ast_result: &ASTResult, ast: &'a syn::DeriveInput) -> Option<ASTContainer<'a>> {
18+
let attrs = AttrsContainer::from_ast(ast_result, ast);
1919
// syn::DeriveInput
2020
// 1. syn::DataUnion
2121
// 2. syn::DataStruct
2222
// 3. syn::DataEnum
2323
let data = match &ast.data {
2424
syn::Data::Struct(data) => {
2525
// https://docs.rs/syn/1.0.48/syn/struct.DataStruct.html
26-
let (style, fields) = struct_from_ast(cx, &data.fields);
26+
let (style, fields) = struct_from_ast(ast_result, &data.fields);
2727
ASTData::Struct(style, fields)
2828
}
2929
syn::Data::Union(_) => {
30-
cx.error_spanned_by(ast, "Does not support derive for unions");
30+
ast_result.error_spanned_by(ast, "Does not support derive for unions");
3131
return None;
3232
}
3333
syn::Data::Enum(data) => {
3434
// https://docs.rs/syn/1.0.48/syn/struct.DataEnum.html
35-
ASTData::Enum(enum_from_ast(cx, &ast.ident, &data.variants, &ast.attrs))
35+
ASTData::Enum(enum_from_ast(ast_result, &ast.ident, &data.variants, &ast.attrs))
3636
}
3737
};
3838

@@ -115,7 +115,7 @@ pub struct ASTField<'a> {
115115
}
116116

117117
impl<'a> ASTField<'a> {
118-
pub fn new(cx: &Ctxt, field: &'a syn::Field, index: usize) -> Result<Self, String> {
118+
pub fn new(cx: &ASTResult, field: &'a syn::Field, index: usize) -> Result<Self, String> {
119119
let mut bracket_inner_ty = None;
120120
let mut bracket_ty = None;
121121
let mut bracket_category = Some(BracketCategory::Other);
@@ -202,7 +202,7 @@ pub enum ASTStyle {
202202
Unit,
203203
}
204204

205-
pub fn struct_from_ast<'a>(cx: &Ctxt, fields: &'a syn::Fields) -> (ASTStyle, Vec<ASTField<'a>>) {
205+
pub fn struct_from_ast<'a>(cx: &ASTResult, fields: &'a syn::Fields) -> (ASTStyle, Vec<ASTField<'a>>) {
206206
match fields {
207207
syn::Fields::Named(fields) => (ASTStyle::Struct, fields_from_ast(cx, &fields.named)),
208208
syn::Fields::Unnamed(fields) if fields.unnamed.len() == 1 => {
@@ -214,7 +214,7 @@ pub fn struct_from_ast<'a>(cx: &Ctxt, fields: &'a syn::Fields) -> (ASTStyle, Vec
214214
}
215215

216216
pub fn enum_from_ast<'a>(
217-
cx: &Ctxt,
217+
cx: &ASTResult,
218218
ident: &syn::Ident,
219219
variants: &'a Punctuated<syn::Variant, Token![,]>,
220220
enum_attrs: &[syn::Attribute],
@@ -235,7 +235,7 @@ pub fn enum_from_ast<'a>(
235235
.collect()
236236
}
237237

238-
fn fields_from_ast<'a>(cx: &Ctxt, fields: &'a Punctuated<syn::Field, Token![,]>) -> Vec<ASTField<'a>> {
238+
fn fields_from_ast<'a>(cx: &ASTResult, fields: &'a Punctuated<syn::Field, Token![,]>) -> Vec<ASTField<'a>> {
239239
fields
240240
.iter()
241241
.enumerate()

0 commit comments

Comments
 (0)