Commit f4297b0
authored
Rollup merge of rust-lang#98125 - KarlWithK:entry_add_modify_doc, r=Dylan-DPC
Entry and_modify doc
This PR modifies the documentation for [HashMap](https://doc.rust-lang.org/std/collections/struct.HashMap.html#) and [BTreeMap](https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#) by introducing examples for `and_modify`. `and_modify` is a function that tends to give more idiomatic rust code when dealing with these data structures -- yet it lacked examples and was hidden away. This PR adds that and addresses rust-lang#98122.
I've made some choices which I tried to explain in my commits. This is my first time contributing to rust, so hopefully, I made the right choices.2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
| |||
1211 | 1214 | | |
1212 | 1215 | | |
1213 | 1216 | | |
1214 | | - | |
| 1217 | + | |
1215 | 1218 | | |
1216 | 1219 | | |
1217 | 1220 | | |
| 1221 | + | |
| 1222 | + | |
1218 | 1223 | | |
1219 | 1224 | | |
1220 | 1225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
829 | 832 | | |
830 | 833 | | |
831 | 834 | | |
832 | | - | |
833 | | - | |
| 835 | + | |
834 | 836 | | |
835 | 837 | | |
836 | 838 | | |
| |||
0 commit comments