-
-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- marked
#[enum_def]
of sea-query-attr
as deprecated
- added extended version of `#[enum_def]` in `sea-query-derive` - upgraded `darling` crate from 0.14 to 0.20
- Loading branch information
1 parent
f4c4efc
commit 7f996cc
Showing
15 changed files
with
340 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
sea-query-derive/src/error.rs → sea-query-derive/src/iden/error.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
pub(crate) mod attr; | ||
pub(crate) mod error; | ||
pub(crate) mod path; | ||
pub(crate) mod write_arm; | ||
|
||
use proc_macro2::TokenStream as TokenStream2; | ||
use quote::quote; | ||
use syn::Ident; | ||
|
||
use self::write_arm::WriteArm; | ||
|
||
pub(crate) struct DeriveIden; | ||
|
||
impl WriteArm for DeriveIden { | ||
fn variant(variant: TokenStream2, name: TokenStream2) -> TokenStream2 { | ||
quote! { Self::#variant => write!(s, "{}", #name).unwrap() } | ||
} | ||
|
||
fn flattened(variant: TokenStream2, name: &Ident) -> TokenStream2 { | ||
quote! { Self::#variant => #name.unquoted(s) } | ||
} | ||
} | ||
|
||
pub(crate) struct DeriveIdenStatic; | ||
|
||
impl WriteArm for DeriveIdenStatic { | ||
fn variant(variant: TokenStream2, name: TokenStream2) -> TokenStream2 { | ||
quote! { Self::#variant => #name } | ||
} | ||
|
||
fn flattened(variant: TokenStream2, name: &Ident) -> TokenStream2 { | ||
quote! { Self::#variant => #name.as_str() } | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.