Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ negative_feature_names = "warn"
path_buf_push_overwrite = "warn"
ptr_as_ptr = "warn"
rc_mutex = "warn"
redundant_clone = "warn"
redundant_feature_names = "warn"
ref_option_ref = "warn"
rest_pat_in_fully_bound_structs = "warn"
Expand Down
8 changes: 4 additions & 4 deletions crates/toml/tests/serde/general.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ Foo {
);
println!("Value::try_from(literal)");
assert_data_eq!(
toml::Value::try_from(literal.clone())
toml::Value::try_from(literal)
.unwrap_err()
.to_string(),
str!["u64 value was too large"].raw()
Expand Down Expand Up @@ -1284,7 +1284,7 @@ Foo {
);
println!("Value::try_from(literal)");
assert_data_eq!(
toml::Value::try_from(literal.clone())
toml::Value::try_from(literal)
.unwrap_err()
.to_string(),
str!["i128 is not supported"].raw()
Expand Down Expand Up @@ -1347,7 +1347,7 @@ Foo {
);
println!("Value::try_from(literal)");
assert_data_eq!(
toml::Value::try_from(literal.clone())
toml::Value::try_from(literal)
.unwrap_err()
.to_string(),
str!["i128 is not supported"].raw()
Expand Down Expand Up @@ -1410,7 +1410,7 @@ Foo {
);
println!("Value::try_from(literal)");
assert_data_eq!(
toml::Value::try_from(literal.clone())
toml::Value::try_from(literal)
.unwrap_err()
.to_string(),
str!["u128 is not supported"].raw()
Expand Down
2 changes: 1 addition & 1 deletion crates/toml_edit/src/inline_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ impl InlineTable {
use indexmap::map::MutableEntryKey;
let key = Key::new(key);
let value = Item::Value(value);
match self.items.entry(key.clone()) {
match self.items.entry(key) {
indexmap::map::Entry::Occupied(mut entry) => {
entry.key_mut().fmt();
let old = std::mem::replace(entry.get_mut(), value);
Expand Down
2 changes: 1 addition & 1 deletion crates/toml_edit/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ impl Table {
pub fn insert(&mut self, key: &str, item: Item) -> Option<Item> {
use indexmap::map::MutableEntryKey;
let key = Key::new(key);
match self.items.entry(key.clone()) {
match self.items.entry(key) {
indexmap::map::Entry::Occupied(mut entry) => {
entry.key_mut().fmt();
let old = std::mem::replace(entry.get_mut(), item);
Expand Down