1pub trait IntoBoxed<T: ?Sized> {
2 fn into_boxed(self) -> Box<T>;
3}
4
5impl<T> IntoBoxed<T> for T {
6 #[inline]
7 fn into_boxed(self) -> Box<T> {
8 Box::new(self)
9 }
10}
11
12impl<T: ?Sized> IntoBoxed<T> for Box<T> {
13 #[inline]
14 fn into_boxed(self) -> Box<T> {
15 self
16 }
17}