]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #23316 - alexcrichton:less-question-sized, r=aturon
authorbors <bors@rust-lang.org>
Sun, 15 Mar 2015 09:18:42 +0000 (09:18 +0000)
committerbors <bors@rust-lang.org>
Sun, 15 Mar 2015 09:18:42 +0000 (09:18 +0000)
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]


Trivial merge