mirror of
https://github.com/allankoechke/rust.git
synced 2026-12-05 17:36:20 +00:00
Forward all array `PartialOrd` to slices I happened to notice that these have had too many `&`s since before 1.0 -- it ends up using `&[T]: PartialOrd` and thus wastefully need to forward to `[T]: PartialOrd`. So re-written to specify the implementation to which we're trying to delegate explicitly (by writing `<[T] as PartialOrd>`) which means we no longer need the `&&self[..]`-style dance at all since the unsizing coercion will do the right thing. And while I was here delegating stuff, it also delegates the `__chaining_*` methods, since those have custom overrides for slices (rust-lang/rust#138881) and we ought to take advantage of that for arrays too.