Commit 6e024ec
authored
Rollup merge of rust-lang#111702 - cgwalters:option-map-or-else-with-result, r=Mark-Simulacrum
Option::map_or_else: Show an example of integrating with Result
Moving this from rust-lang/libs-team#59 where an API addition was rejected. But I think it's valuable to add this example to the documentation at least.1 file changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1138 | 1138 | | |
1139 | 1139 | | |
1140 | 1140 | | |
1141 | | - | |
| 1141 | + | |
1142 | 1142 | | |
1143 | 1143 | | |
1144 | 1144 | | |
| |||
1149 | 1149 | | |
1150 | 1150 | | |
1151 | 1151 | | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1152 | 1171 | | |
1153 | 1172 | | |
1154 | 1173 | | |
| |||
0 commit comments