Skip to content

refactor(encoding): Consolidate encodingFactory_ into EncodingTrait#617

Open
HuamengJiang wants to merge 1 commit intofacebookincubator:mainfrom
HuamengJiang:export-D97603426
Open

refactor(encoding): Consolidate encodingFactory_ into EncodingTrait#617
HuamengJiang wants to merge 1 commit intofacebookincubator:mainfrom
HuamengJiang:export-D97603426

Conversation

@HuamengJiang
Copy link
Copy Markdown

Summary:
Consolidate the encodingFactory_ callable and getStringBuffersFromDecoder_ bool pair
with trait-based branching using DefaultEncodingTrait::decode and
LegacyEncodingTrait::decode. Since encodingFactory_ was always determined by
getStringBuffersFromDecoder_, the factory is redundant — the trait already captures
the legacy vs non-legacy distinction.

This makes the branching of encoding depend solely on getStringBuffersFromDecoder_

Differential Revision: D97603426

Summary:
Consolidate the `encodingFactory_` callable and `getStringBuffersFromDecoder_` bool pair
with trait-based branching using `DefaultEncodingTrait::decode` and
`LegacyEncodingTrait::decode`. Since `encodingFactory_` was always determined by
`getStringBuffersFromDecoder_`, the factory is redundant — the trait already captures
the legacy vs non-legacy distinction.

This makes the branching of encoding depend solely on `getStringBuffersFromDecoder_`

Differential Revision: D97603426
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Mar 26, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Mar 26, 2026

@HuamengJiang has exported this pull request. If you are a Meta employee, you can view the originating Diff in D97603426.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants