Allow InlineTable insert API to accept Into<Value>#1069
Merged
epage merged 1 commit intotoml-rs:mainfrom Dec 5, 2025
Merged
Conversation
Pull Request Test Coverage Report for Build 19515719993Details
💛 - Coveralls |
b4e98d4 to
65fd5b1
Compare
epage
reviewed
Nov 19, 2025
InlineTable insert APIs to accept Into<Value>InlineTable insert API to accept Into<Value>
9308f2f to
86590e0
Compare
epage
reviewed
Nov 19, 2025
Contributor
Author
|
@epage Was there still a blocker for this? I'd be happy to rebase and amend the commit message if that's needed. |
Member
|
Every time I look at this, I go back and forth. We don't really have a good principled reason for what we do. I'll go ahead and merge and we can re-evaluate when we change up tables (#762 (comment)). |
Member
|
The release was yanked and the change reverted because it broke type inference, see #1074 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This diff updates
InlineTable::insertto accept anyV: Into<Value>just likeget_or_insert, converting internally before storing. This lets callers pass primitive literals (&str, numbers, etc.) without manual Value construction while preserving existing behavior for Value. There are no behavior changes beyond the added flexibility.