use core::borrow::Borrow;
use crate::alloc::{Allocator, String, Vec};
pub trait ToOwned {
type Owned<A>: Borrow<Self>
where
A: Allocator;
}
impl<T> ToOwned for [T] {
type Owned<A>
= Vec<T, A>
where
A: Allocator;
}
impl ToOwned for str {
type Owned<A>
= String<A>
where
A: Allocator;
}