Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

refactor(rome_formatter): Extract shared separated logic #4056

Merged
merged 2 commits into from
Dec 15, 2022

Conversation

MichaReiser
Copy link
Contributor

Summary

This PR extracts the separated() helper for formatting separated lists into rome_formatter so that it can be re-used between the different language implementations.

It's a bit awkward because the AsFormat and IntoFormat aren't available in the rome_formatter crate. That's why the iterator extension trait must still be duplicated between implementations.

Test Plan

cargo test

Documentation

  • The PR requires documentation
  • I will create a new PR to update the documentation

@netlify
Copy link

netlify bot commented Dec 15, 2022

Deploy Preview for docs-rometools canceled.

Name Link
🔨 Latest commit 72489f9
🔍 Latest deploy log https://app.netlify.com/sites/docs-rometools/deploys/639aee60b3b4120008186298

@MichaReiser MichaReiser added the A-Formatter Area: formatter label Dec 15, 2022
@MichaReiser
Copy link
Contributor Author

CC: @denbezrukov

@ematipico ematipico merged commit b438879 into main Dec 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Formatter Area: formatter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants