I was reading the sort impls on slices and I noticed some duplicated logic. In libcore there's a function called
shift_head that has exactly the same code as a function called
insert_head in liballoc. Is there some way to de-duplicate this?
to be clear, I'm just asking if it's possible to re-use private code from libcore within liballoc. If so, I would make a PR or something about this specific case.
Those functions can probably be made public (you definitely can't reuse private code) and
#[doc(hidden)] and unstable, so we can use them but no one else can (easily)