We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dab7e80 commit 020c923Copy full SHA for 020c923
gen/src/find.rs
@@ -1,6 +1,5 @@
1
use crate::gen::{Error, Input, Result};
2
use crate::syntax::namespace::Namespace;
3
-use quote::quote;
4
use syn::{Attribute, File, Item};
5
6
pub(super) fn find_bridge_mod(syntax: File) -> Result<Input> {
@@ -14,8 +13,8 @@ fn scan(items: Vec<Item>) -> Result<Option<Input>> {
14
13
for item in items {
15
if let Item::Mod(item) = item {
16
for attr in &item.attrs {
17
- let path = &attr.path;
18
- if quote!(#path).to_string() == "cxx :: bridge" {
+ let path = &attr.path.segments;
+ if path.len() == 2 && path[0].ident == "cxx" && path[1].ident == "bridge" {
19
let module = match item.content {
20
Some(module) => module.1,
21
None => {
0 commit comments