Repository: pyrossh/rust-embed (language: rust)

Issue:
Bump `syn` ^2
`syn` has bumped to ^2 - perhaps a a good idea to bump here `rust-embed-impl` as well

https://github.com/dtolnay/syn/releases/tag/2.0.0


Discussion / hints:
Nice. Would you be interested in a PR for this?

Fix patch:
diff --git a/impl/Cargo.toml b/impl/Cargo.toml
index f9a35d3..7dad2dd 100644
--- a/impl/Cargo.toml
+++ b/impl/Cargo.toml
@@ -17,7 +17,7 @@ proc-macro = true
 [dependencies]
 rust-embed-utils = { version = "7.5.0", path = "../utils"}
 
-syn = { version = "1", default-features = false, features = ["derive", "parsing", "proc-macro"] }
+syn = { version = "2", default-features = false, features = ["derive", "parsing", "proc-macro"] }
 quote = "1"
 proc-macro2 = "1"
 walkdir = "2.3.1"
diff --git a/impl/src/lib.rs b/impl/src/lib.rs
index aadb685..85f556f 100644
--- a/impl/src/lib.rs
+++ b/impl/src/lib.rs
@@ -7,7 +7,7 @@ extern crate proc_macro;
 use proc_macro::TokenStream;
 use proc_macro2::TokenStream as TokenStream2;
 use std::{env, path::Path};
-use syn::{Data, DeriveInput, Fields, Lit, Meta, MetaNameValue};
+use syn::{Data, DeriveInput, Expr, ExprLit, Fields, Lit, Meta, MetaNameValue};
 
 fn embedded(ident: &syn::Ident, folder_path: String, prefix: Option<&str>, includes: &[String], excludes: &[String]) -> TokenStream2 {
   extern crate rust_embed_utils;
@@ -210,10 +210,12 @@ fn find_attribute_values(ast: &syn::DeriveInput, attr_name: &str) -> Vec<String>
   ast
     .attrs
     .iter()
-    .filter(|value| value.path.is_ident(attr_name))
-    .filter_map(|attr| attr.parse_meta().ok())
-    .filter_map(|meta| match meta {
-      Meta::NameValue(MetaNameValue { lit: Lit::Str(val), .. }) => Some(val.value()),
+    .filter(|value| value.path().is_ident(attr_name))
+    .filter_map(|attr| match &attr.meta {
+      Meta::NameValue(MetaNameValue {
+        value: Expr::Lit(ExprLit { lit: Lit::Str(val), .. }),
+        ..
+      }) => Some(val.value()),
       _ => None,
     })
     .collect()


Test patch: