Commit 4334d3c
committed
auto merge of #19248 : japaric/rust/str, r=alexcrichton
Just like we do with AsSlice
This comes in handy when dealing with iterator-centric APIs (`IntoIterator`!) and you want to receive an `Iterator<S> where S: Str` argument. Without this PR, e.g. you can't receive `&["a", "b"].iter()` instead you'll have to type `&["a", "b"].iter().map(|&x| x)` (A similar thing happens with `&[String]`).
r? @aturon
Full disclaimer: I haven't run `make`/`make check` yet (All my cores are busy)1 file changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1277 | 1277 | | |
1278 | 1278 | | |
1279 | 1279 | | |
1280 | | - | |
| 1280 | + | |
1281 | 1281 | | |
1282 | 1282 | | |
1283 | 1283 | | |
1284 | 1284 | | |
1285 | | - | |
| 1285 | + | |
1286 | 1286 | | |
1287 | | - | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
1288 | 1293 | | |
1289 | 1294 | | |
1290 | 1295 | | |
| |||
0 commit comments