Skip to content

Commit a9671d3

Browse files
committed
🔨 Update test name for case with lifetime
1 parent b0cc81a commit a9671d3

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

src/lib.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ mod tests {
9999

100100
#[allow(dead_code)]
101101
#[derive(EnumDisplay)]
102-
enum TestEnumWithGenerics<'a, T: Clone>
102+
enum TestEnumWithLifetimeAndGenerics<'a, T: Clone>
103103
where
104104
T: std::fmt::Display,
105105
{
@@ -195,14 +195,17 @@ mod tests {
195195
}
196196

197197
#[test]
198-
fn test_unit_field_variant_with_generics() {
199-
assert_eq!(TestEnumWithGenerics::<'_, String>::Name.to_string(), "Name");
198+
fn test_unit_field_variant_with_lifetime_and_generics() {
199+
assert_eq!(
200+
TestEnumWithLifetimeAndGenerics::<'_, String>::Name.to_string(),
201+
"Name"
202+
);
200203
}
201204

202205
#[test]
203-
fn test_named_fields_variant_with_generics() {
206+
fn test_named_fields_variant_with_lifetime_and_generics() {
204207
assert_eq!(
205-
TestEnumWithGenerics::Address {
208+
TestEnumWithLifetimeAndGenerics::Address {
206209
street: &"123 Main St".to_string(),
207210
city: &"Any Town".to_string(),
208211
state: &"CA".to_string(),
@@ -214,9 +217,9 @@ mod tests {
214217
}
215218

216219
#[test]
217-
fn test_unnamed_fields_variant_with_generics() {
220+
fn test_unnamed_fields_variant_with_lifetime_and_generics() {
218221
assert_eq!(
219-
TestEnumWithGenerics::<'_, String>::DateOfBirth(1, 1, 2000).to_string(),
222+
TestEnumWithLifetimeAndGenerics::<'_, String>::DateOfBirth(1, 1, 2000).to_string(),
220223
"DateOfBirth"
221224
);
222225
}

0 commit comments

Comments
 (0)