From 221b07a16177e4780951c256b1f9d349a1146d1f Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 2 Aug 2023 18:54:41 +0200 Subject: test: clean up create_caster_fn_ident unit test --- macros/src/caster.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'macros') diff --git a/macros/src/caster.rs b/macros/src/caster.rs index b84bd4d..c36aa1f 100644 --- a/macros/src/caster.rs +++ b/macros/src/caster.rs @@ -124,7 +124,6 @@ impl IUuid for Uuid mod tests { use pretty_assertions::assert_eq; - use utility_macros::repeat_char; use super::*; @@ -136,15 +135,13 @@ mod tests uuid_mock .expect_encode_simple_lower_into() .return_once(|buf| { - for index in 0..(FN_BUF_LEN - 2) { - buf[index] = b'f'; - } + buf[..FN_BUF_LEN - 2].fill(b'f'); }) .once(); assert_eq!( create_caster_fn_ident(uuid_mock), - format_ident!(concat!("__", repeat_char!('f', 32))) + format_ident!("__{}", "f".repeat(FN_BUF_LEN - 2)) ); } } -- cgit v1.2.3-18-g5258