use core::borrow::Borrow;
#[cfg(any(feature = "alloc", feature = "std"))]
use alloc::string::String;
use crate::{TiSlice, TiVec};
pub trait Concat<Item: ?Sized> {
type Output;
fn concat(slice: &Self) -> Self::Output;
}
impl<K, V: Borrow<str>> Concat<str> for TiSlice<K, V> {
type Output = String;
fn concat(slice: &Self) -> Self::Output {
slice.raw.concat()
}
}
impl<K, T: Clone, V: Borrow<[T]>> Concat<T> for TiSlice<K, V> {
type Output = TiVec<K, T>;
fn concat(slice: &Self) -> Self::Output {
slice.raw.concat().into()
}
}