Skip to content

Commit 6b60633

Browse files
committed
Implement review feedback
1 parent 10cb580 commit 6b60633

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

unic/utils/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
//! Utilities for use in UNIC development.
1110

1211

1312
#![forbid(missing_docs)]

unic/utils/src/macros.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
/// }
2323
///
2424
/// /// Zero or more attributes
25-
/// pub mod abbr_names;
25+
/// pub mod abbr_names for abbr;
2626
///
2727
/// /// Zero or more attributes
28-
/// pub mod long_names;
28+
/// pub mod long_names for long;
2929
/// }
3030
///
3131
/// // You must impl (Partial/Complete)CharProperty manually.
@@ -67,8 +67,8 @@ macro_rules! char_property {
6767
$( $(#[$variant_meta:meta])+ $variant:ident $tt:tt )*
6868
}
6969

70-
$(#[$abbr_names_meta:meta])* pub mod $abbr_names:ident;
71-
$(#[$long_names_meta:meta])* pub mod $long_names:ident;
70+
$(#[$abbr_names_meta:meta])* pub mod $abbr_names:ident for abbr;
71+
$(#[$long_names_meta:meta])* pub mod $long_names:ident for long;
7272
) => {
7373
__char_property_internal! {
7474
$(#[$name_meta])* pub enum $name
@@ -320,7 +320,6 @@ macro_rules! __char_property_internal {
320320
}
321321

322322
#[allow(bad_style)]
323-
#[allow(unreachable_patterns)]
324323
impl $crate::char_property::EnumeratedCharProperty for $name {
325324
fn abbr_name(&self) -> &'static str {
326325
match *self {

unic/utils/tests/macro_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ char_property! {
1717
/// Required
1818
DisplayVariant {
1919
abbr => DV,
20-
display => "The one and only DISPLAY VARIANT!!!11!",
20+
display => "The one and only DISPLAY VARIANT!",
2121
}
2222
/// Required
2323
EmptyVariant {
2424
abbr => EV,
2525
}
2626
}
2727

28-
pub mod abbr_names;
29-
pub mod long_names;
28+
pub mod abbr_names for abbr;
29+
pub mod long_names for long;
3030
}
3131

3232
impl unic_utils::char_property::PartialCharProperty for Property {
@@ -51,6 +51,6 @@ fn basic_macro_use() {
5151

5252
assert_eq!(format!("{}", Property::AbbrVariant), "AV");
5353
assert_eq!(format!("{}", Property::LongVariant), "Long Variant");
54-
assert_eq!(format!("{}", Property::DisplayVariant), "The one and only DISPLAY VARIANT!!!11!");
54+
assert_eq!(format!("{}", Property::DisplayVariant), "The one and only DISPLAY VARIANT!");
5555
assert_eq!(format!("{}", Property::EmptyVariant), "EV");
5656
}

0 commit comments

Comments
 (0)