• A
    std: Remove ?Sized bounds from many I/O functions · 60a4a2db
    Alex Crichton 提交于
    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]
    60a4a2db
path.rs 83.6 KB