Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajjon committed Dec 14, 2023
1 parent d6fa8df commit d8702ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion identified_vec_macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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>);

Expand Down
4 changes: 2 additions & 2 deletions tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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()])
Expand Down

0 comments on commit d8702ac

Please sign in to comment.