Skip to content

Commit

Permalink
clippy: disallow usage of uniffi::export
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Oct 8, 2024
1 parent 327a46f commit 145910c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
disallowed-macros = [
"uniffi::export"
]
2 changes: 2 additions & 0 deletions testing/matrix-sdk-ffi-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ pub fn export_async(_attr: TokenStream, item: TokenStream) -> TokenStream {
let item = proc_macro2::TokenStream::from(item);

quote! {
#[allow(clippy::disallowed_macros)]
#[uniffi::export(async_runtime = "tokio")]
#item
}
Expand Down Expand Up @@ -71,6 +72,7 @@ pub fn export(attr: TokenStream, item: TokenStream) -> TokenStream {
quote! {
#maybe_error

#[allow(clippy::disallowed_macros)]
#[uniffi::export(#attr)]
#item
}
Expand Down

0 comments on commit 145910c

Please sign in to comment.