Skip to content

Commit

Permalink
update syn dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
adwhit committed May 31, 2023
1 parent 1f1e072 commit ee95e28
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 37 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "diesel-derive-enum"
version = "2.0.1"
version = "2.1.0"
description = "Derive diesel boilerplate for using enums in databases"
authors = ["Alex Whitney <[email protected]>"]
repository = "https://github.com/adwhit/diesel-derive-enum"
Expand All @@ -12,7 +12,7 @@ edition = "2021"

[dependencies]
quote = "1"
syn = "1"
syn = "2"
heck = "0.4.0"
proc-macro2 = "1"

Expand Down
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,14 @@ pub fn derive(input: TokenStream) -> TokenStream {

fn val_from_attrs(attrs: &[Attribute], attrname: &str) -> Option<String> {
for attr in attrs {
if attr.path.is_ident(attrname) {
match attr.parse_meta().ok()? {
if attr.path().is_ident(attrname) {
match &attr.meta {
Meta::NameValue(MetaNameValue {
lit: Lit::Str(lit_str),
value:
Expr::Lit(ExprLit {
lit: Lit::Str(lit_str),
..
}),
..
}) => return Some(lit_str.value()),
_ => panic!(
Expand Down
19 changes: 4 additions & 15 deletions tests/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Alex Whitney <[email protected]>"]
edition = "2021"

[dependencies]
diesel = "2.1"
diesel = "2.1.0"
diesel-derive-enum = { path = "./.." }

[features]
Expand Down
19 changes: 4 additions & 15 deletions tests_with_diesel_cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests_with_diesel_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Alex Whitney <[email protected]>"]
edition = "2021"

[dependencies]
diesel = { version = "2.1", features = ["postgres"] }
diesel = { version = "2.1.0", features = ["postgres"] }
diesel-derive-enum = { path = "./..", features = ["postgres"]}

[features]
Expand Down

0 comments on commit ee95e28

Please sign in to comment.