Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions crates/toml_edit/src/inline_table.rs
Comment thread
epage marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -377,10 +377,10 @@ impl InlineTable {
}

/// Inserts a key-value pair into the map.
pub fn insert(&mut self, key: impl Into<String>, value: Value) -> Option<Value> {
pub fn insert<V: Into<Value>>(&mut self, key: impl Into<String>, value: V) -> Option<Value> {
use indexmap::map::MutableEntryKey;
let key = Key::new(key);
let value = Item::Value(value);
let value = Item::Value(value.into());
match self.items.entry(key.clone()) {
indexmap::map::Entry::Occupied(mut entry) => {
entry.key_mut().fmt();
Expand Down