Commit 47585c9
authored
Rollup merge of #148912 - msmoiz:main, r=scottmcm
add note to `lines` docs about empty str behavior
This pull request adds a short note to the documentation for `str::lines` that describes the behavior of the resulting iterator when called on an empty string. I tripped over this a few days ago because I thought (incorrectly) that the iterator would return a single line with an empty string. I don't doubt that the actual behavior (return no lines) is the correct behavior, but in the absence of explicit documentation describing it, I came to the wrong conclusion about it and maybe others will too. If this is so obvious as to be not worth including, I'm happy to withdraw the pull request! Thanks for taking a look.1 file changed
+11
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1251 | 1251 | | |
1252 | 1252 | | |
1253 | 1253 | | |
| 1254 | + | |
| 1255 | + | |
1254 | 1256 | | |
1255 | 1257 | | |
1256 | 1258 | | |
| |||
1281 | 1283 | | |
1282 | 1284 | | |
1283 | 1285 | | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1284 | 1295 | | |
1285 | 1296 | | |
1286 | 1297 | | |
| |||
0 commit comments