Skip to content

Commit

Permalink
Merge pull request #297 from dtolnay-contrib/body
Browse files Browse the repository at this point in the history
Support applying unused_braces rustc suggestion in py_module_initializer
  • Loading branch information
markbt authored Aug 14, 2024
2 parents 980950e + 6f54ab9 commit a60f149
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ pub mod _detail {
#[macro_export]
#[cfg(feature = "python27-sys")]
macro_rules! py_module_initializer {
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: tt) => {
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: expr) => {
$crate::_detail::paste::item! {
#[no_mangle]
#[allow(non_snake_case)]
Expand Down Expand Up @@ -349,7 +349,7 @@ pub unsafe fn py_module_initializer_impl(
#[macro_export]
#[cfg(feature = "python3-sys")]
macro_rules! py_module_initializer {
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: tt) => {
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: expr) => {
$crate::_detail::paste::item! {
#[no_mangle]
#[allow(non_snake_case)]
Expand Down

0 comments on commit a60f149

Please sign in to comment.