diff --git a/identified_vec_macros/src/lib.rs b/identified_vec_macros/src/lib.rs index 926b53a..0e2043c 100644 --- a/identified_vec_macros/src/lib.rs +++ b/identified_vec_macros/src/lib.rs @@ -1,5 +1,5 @@ #[macro_export] -macro_rules! new_identified_vec { +macro_rules! newtype_identified_vec { (of: $item_ty: ty, named: $struct_name: ident) => { pub struct $struct_name(IdentifiedVecOf<$item_ty>); diff --git a/tests/tests.rs b/tests/tests.rs index 9bda95e..e51b40a 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -5,7 +5,7 @@ use identified_vec::{ IdentifiedVecOfSerdeFailure, IsIdentifiableVec, }; -use identified_vec_macros::new_identified_vec; +use identified_vec_macros::newtype_identified_vec; #[derive(Eq, PartialEq, Clone)] pub struct User { @@ -540,7 +540,7 @@ fn hash() { #[test] fn test_macro() { - new_identified_vec!(of: User, named: CollectionOfUsers); + newtype_identified_vec!(of: User, named: CollectionOfUsers); let mut users = CollectionOfUsers::new(); users.0.append(User::blob()); assert_eq!(users.0.items(), [User::blob()])