Clones a fixed-sized collection of references into a collection of values.
This trait is only implemented for built-in/
if the "colltraits" cargo feature is enabled.
Enabling the "alloc" or "std" features changes the impl from this crate from
Clone bounds to using
ToOwned is declared in the
ToOwned is implemented for all types that implement
and is not declared in
which means that you can't call
without enabling either the "alloc" or "std" features.
use core_extensions::collection_traits::Cloned; assert_eq!( (&2,).cloned_(), (2,) ); assert_eq!( (&2,&3).cloned_(), (2,3) ); assert_eq!( (&2,&3,&5).cloned_(), (2,3,5) ); assert_eq!( (&2,&3,&5,&8).cloned_(), (2,3,5,8) );
The type of this tuple with owned values instead of references to them.