Skip to content

Commit a50ea7b

Browse files
committed
Remove irrelevant detail from Map::insert documentation
This sentence is from the documentation of HashMap::insert, which applies to arbitrary key types K. In serde_json::Map the key type is always String. Technically the behavior may still be observable if someone looks at the memory address of the key string bytes through `as_str() as *const str` but users are unlikely to require this guarantee.
1 parent 1b36cec commit a50ea7b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/map.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ impl Map<String, Value> {
117117
/// If the map did not have this key present, `None` is returned.
118118
///
119119
/// If the map did have this key present, the value is updated, and the old
120-
/// value is returned. The key is not updated, though; this matters for
121-
/// types that can be `==` without being identical.
120+
/// value is returned.
122121
#[inline]
123122
pub fn insert(&mut self, k: String, v: Value) -> Option<Value> {
124123
self.map.insert(k, v)

0 commit comments

Comments
 (0)