Skip to content

Commit 9c607b0

Browse files
committed
Remove unnecessary array allocation
1 parent bcb327d commit 9c607b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/CommunityToolkit.Mvvm.SourceGenerators/ComponentModel/ObservablePropertyGenerator.Execute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ public static MemberDeclarationSyntax GetPropertySyntax(PropertyInfo propertyInf
961961
.AddArgumentListArguments(
962962
Argument(fieldExpression),
963963
Argument(IdentifierName("value")))),
964-
Block(setterStatements.ToArray()));
964+
Block(setterStatements.AsEnumerable()));
965965

966966
// Prepare the forwarded attributes, if any
967967
ImmutableArray<AttributeListSyntax> forwardedAttributes =

0 commit comments

Comments
 (0)