Skip to content

Simplify resource attribute handling and reduce clones#281

Merged
mheffner merged 3 commits intomainfrom
simple-res-attrs
Jan 21, 2026
Merged

Simplify resource attribute handling and reduce clones#281
mheffner merged 3 commits intomainfrom
simple-res-attrs

Conversation

@mheffner
Copy link
Copy Markdown
Member

@mheffner mheffner commented Jan 20, 2026

This extracts the mutable resource method from the attribute building, allowing us to simplify the base code.

After this, we reduce the number of clones required here. From claude's summary, the following were reduced:

  • ✅ N clones of the Vec<KeyValue> structure itself
  • ✅ N × M clones of existing resource KeyValues
  • ✅ N × M clones from map.values().cloned()
  • ✅ N × M clones of String keys
    (N items in payload, M resource attributes)

Signed-off-by: Mike Heffner <mikeh@fesnel.com>
Signed-off-by: Mike Heffner <mikeh@fesnel.com>
Signed-off-by: Mike Heffner <mikeh@fesnel.com>
@mheffner mheffner requested a review from rjenkins January 20, 2026 20:26
@mheffner mheffner merged commit 4832c69 into main Jan 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants