Skip to content

Commit 6f54ab9

Browse files
committed
Support applying unused_braces rustc suggestion in py_module_initializer
1 parent 980950e commit 6f54ab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ pub mod _detail {
299299
#[macro_export]
300300
#[cfg(feature = "python27-sys")]
301301
macro_rules! py_module_initializer {
302-
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: tt) => {
302+
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: expr) => {
303303
$crate::_detail::paste::item! {
304304
#[no_mangle]
305305
#[allow(non_snake_case)]
@@ -349,7 +349,7 @@ pub unsafe fn py_module_initializer_impl(
349349
#[macro_export]
350350
#[cfg(feature = "python3-sys")]
351351
macro_rules! py_module_initializer {
352-
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: tt) => {
352+
($name: ident, $( $_py2: ident, $_py3: ident, )? |$py_id: ident, $m_id: ident| $body: expr) => {
353353
$crate::_detail::paste::item! {
354354
#[no_mangle]
355355
#[allow(non_snake_case)]

0 commit comments

Comments
 (0)