diff options
| author | bors <bors@rust-lang.org> | 2015-03-15 09:18:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-03-15 09:18:42 +0000 |
| commit | 54660fc392343e4ddee8a0ea1ca196ffc533585b (patch) | |
| tree | fef688e18277c0011e4d52fe830b24b0c396dedf /src/libstd/lib.rs | |
| parent | f59af75bd851b1a80cd2fab5cddd2875dcaf710e (diff) | |
| parent | 60a4a2db8837be91bdae051bd51ab181077e5dc6 (diff) | |
| download | rust-54660fc392343e4ddee8a0ea1ca196ffc533585b.tar.gz rust-54660fc392343e4ddee8a0ea1ca196ffc533585b.zip | |
Auto merge of #23316 - alexcrichton:less-question-sized, r=aturon
It is a frequent pattern among I/O functions to take `P: AsPath + ?Sized` or `AsOsStr` instead of `AsPath`. Most of these functions do not need to take ownership of their argument, but for libraries in general it's much more ergonomic to not deal with `?Sized` at all and simply require an argument `P` instead of `&P`. This change is aimed at removing unsightly `?Sized` bounds while retaining the same level of usability as before. All affected functions now take ownership of their arguments instead of taking them by reference, but due to the forwarding implementations of `AsOsStr` and `AsPath` all code should continue to work as it did before. This is strictly speaking a breaking change due to the signatures of these functions changing, but normal idiomatic usage of these APIs should not break in practice. [breaking-change]
Diffstat (limited to 'src/libstd/lib.rs')
0 files changed, 0 insertions, 0 deletions
