Commit fea9196
authored
Rollup merge of rust-lang#146293 - BenjaminBrienen:try_remove, r=joboet
feat: non-panicking `Vec::try_remove`
`if index < my_vector.len() { Some(my_vector.remove(index)) } else { None }` is annoying to write and non-panicking functions are broadly useful.
APC: rust-lang/libs-team#649
Tracking issue: rust-lang#1469543 files changed
+46
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2173 | 2173 | | |
2174 | 2174 | | |
2175 | 2175 | | |
| 2176 | + | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
| 2190 | + | |
| 2191 | + | |
| 2192 | + | |
| 2193 | + | |
| 2194 | + | |
| 2195 | + | |
| 2196 | + | |
| 2197 | + | |
| 2198 | + | |
| 2199 | + | |
| 2200 | + | |
| 2201 | + | |
| 2202 | + | |
| 2203 | + | |
2176 | 2204 | | |
2177 | 2205 | | |
2178 | | - | |
| 2206 | + | |
2179 | 2207 | | |
2180 | 2208 | | |
2181 | 2209 | | |
| |||
2191 | 2219 | | |
2192 | 2220 | | |
2193 | 2221 | | |
2194 | | - | |
| 2222 | + | |
2195 | 2223 | | |
2196 | 2224 | | |
2197 | 2225 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
633 | 648 | | |
634 | 649 | | |
635 | 650 | | |
| |||
0 commit comments