Skip to content

Commit dbf9ad1

Browse files
ColinFincknicholasbishop
authored andcommitted
Support any visibility for the structs created by newtype_enum!
1 parent e2cde21 commit dbf9ad1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/data_types/enums.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
macro_rules! newtype_enum {
4545
(
4646
$(#[$type_attrs:meta])*
47-
pub enum $type:ident : $base_integer:ty => $(#[$impl_attrs:meta])* {
47+
$visibility:vis enum $type:ident : $base_integer:ty => $(#[$impl_attrs:meta])* {
4848
$(
4949
$(#[$variant_attrs:meta])*
5050
$variant:ident = $value:expr,
@@ -54,7 +54,7 @@ macro_rules! newtype_enum {
5454
$(#[$type_attrs])*
5555
#[repr(transparent)]
5656
#[derive(Clone, Copy, Eq, PartialEq)]
57-
pub struct $type(pub $base_integer);
57+
$visibility struct $type(pub $base_integer);
5858

5959
$(#[$impl_attrs])*
6060
#[allow(unused)]

0 commit comments

Comments
 (0)