Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(fmt)!: Generalize custom formatter to 'RecordFormat' #361

Draft
epage wants to merge 1 commit intorust-cli:main from
epage:format-trait
Draft

feat(fmt)!: Generalize custom formatter to 'RecordFormat' #361
epage wants to merge 1 commit intorust-cli:main from
epage:format-trait

Conversation

@epage
Copy link
Contributor

@epage epage commented Apr 1, 2025

This breaks type inference for basic custom formatters

@epage epage marked this pull request as draft April 1, 2025 19:20
Copy link

coveralls commented Apr 1, 2025
edited
Loading

Pull Request Test Coverage Report for Build 14844590081

Details

  • 0 of 1 (0.0%) changed or added relevant line in 1 file are covered.
  • 4 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-0.4%) to 43.76%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/fmt/mod.rs 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/fmt/mod.rs 4 62.5%
Totals Coverage Status
Change from base Build 14242549930: -0.4%
Covered Lines: 263
Relevant Lines: 601

💛 - Coveralls

This breaks type inference for basic custom formatters
Copy link

djugei commented May 12, 2025

I have tested a similar change for #363 and i recommend against it.

Too much type info annoyance. I would instead recommend having two separate functions, one for the common case (FormatFn) and one for special needs (RecordFormat)

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

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Comments

AltStyle によって変換されたページ (->オリジナル) /