Skip to content

Commit 80fa4ce

Browse files
committed
Improve error handling in polymorphic_fn by formatting the error message for missing implementations with proper line breaks for better readability.
1 parent a79f959 commit 80fa4ce

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

polymorphic_fn/src/lib.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ pub fn polymorphic_fn(input: TokenStream) -> TokenStream {
8888
let implementations: Vec<&Block> = input.implementations.iter().collect();
8989

9090
if implementations.is_empty() {
91-
return syn::Error::new_spanned(&input.name, "At least one implementation must be provided")
91+
return syn::Error::new_spanned(
92+
&input.name,
93+
"At least one implementation must be provided",
94+
)
9295
.to_compile_error()
9396
.into();
9497
}

0 commit comments

Comments
 (0)