Skip to content

Commit 512d20f

Browse files
denikclaude
andcommitted
Replace make+copy with direct assignment in migrateGrantsEntry
old.Grants is a fresh local allocation from json.Unmarshal, no aliasing risk. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent ed528f7 commit 512d20f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

bundle/direct/dstate/migrate.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,8 @@ func migrateGrantsEntry(raw json.RawMessage) (json.RawMessage, error) {
132132
newState := dresources.GrantsState{
133133
SecurableType: old.SecurableType,
134134
FullName: old.FullName,
135-
EmbeddedSlice: make([]catalog.PrivilegeAssignment, len(old.Grants)),
135+
EmbeddedSlice: old.Grants,
136136
}
137-
copy(newState.EmbeddedSlice, old.Grants)
138137

139138
return json.Marshal(newState)
140139
}

0 commit comments

Comments
 (0)