Skip to content

Comments

refactor(serde): reuse deserialize_into in OtherFields::deserialize_as#3533

Merged
onbjerg merged 1 commit intoalloy-rs:mainfrom
vtjl10:patch-4
Jan 16, 2026
Merged

refactor(serde): reuse deserialize_into in OtherFields::deserialize_as#3533
onbjerg merged 1 commit intoalloy-rs:mainfrom
vtjl10:patch-4

Conversation

@vtjl10
Copy link
Contributor

@vtjl10 vtjl10 commented Jan 16, 2026

OtherFields::deserialize_as duplicated the conversion logic already implemented in deserialize_into, which increases the chance of the two methods drifting over time.

Make deserialize_as delegate to deserialize_into (self.clone().deserialize_into()), keeping the API and behavior unchanged while maintaining a single source of truth.

@github-project-automation github-project-automation bot moved this to Reviewed in Alloy Jan 16, 2026
@onbjerg onbjerg merged commit 7496fd9 into alloy-rs:main Jan 16, 2026
30 checks passed
@github-project-automation github-project-automation bot moved this from Reviewed to Done in Alloy Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants