Skip to content

Commit 33f2826

Browse files
committed
fix: bug while removing terminal comma
1 parent 84f251a commit 33f2826

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/src5_rs/core/parser/cairo_function.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,9 @@ impl CairoNonGenericFunction {
4242
efs_signature.push_str(&input.get_src5_type(db, cairo_structs, cairo_enums)?);
4343
efs_signature.push(',');
4444
}
45-
efs_signature.pop(); // Remove last comma
45+
if efs_signature.ends_with(',') {
46+
efs_signature.pop(); // Remove last comma
47+
}
4648
efs_signature.push(')');
4749

4850
// Resolve return type

0 commit comments

Comments
 (0)