Skip to content

feat: implement Format for SmallVec - #472

Open
alejandro-vaz wants to merge 6 commits into
servo:v2from
alejandro-vaz:defmt
Open

feat: implement Format for SmallVec#472
alejandro-vaz wants to merge 6 commits into
servo:v2from
alejandro-vaz:defmt

Conversation

@alejandro-vaz

@alejandro-vaz alejandro-vaz commented Aug 29, 2026

Copy link
Copy Markdown
Collaborator

this PR implements defmt::Format for SmallVec

it does not implement the trait for its iterators

it is locked behind the feature gate "defmt"

this is the initial implementation of it, thus it won't close issue #389, it still lacks:

  • testing
  • implementations for iterators

note: it's not written on its own file as #427 moves towards because it is not an API boundary. it is not only the smallvec type that will implement Format, but also Drain, ExtractIf, etc => it is simply one feature-gated implementation on the types

closes #391

closes #473

@alejandro-vaz alejandro-vaz added this to the v2-beta.1 milestone Aug 29, 2026
@alejandro-vaz alejandro-vaz self-assigned this Aug 29, 2026
@alejandro-vaz

Copy link
Copy Markdown
Collaborator Author

note: do not merge this before #458 due to possible merge conflicts

@alejandro-vaz
alejandro-vaz requested a review from jdm August 29, 2026 03:52
@alejandro-vaz alejandro-vaz removed this from the v2-beta.1 milestone Aug 29, 2026
Comment thread Cargo.toml
keywords = ["small", "vec", "vector", "stack", "no_std"]
categories = ["data-structures"]
readme = "README.md"
documentation = "https://docs.rs/smallvec/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these changes?

@alejandro-vaz alejandro-vaz Aug 30, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh just randomly did them, didn't even notice

those are the default values and I thought it was weird to have them explicit

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.

defmt initial implementation

2 participants