Trait gazebo::prelude::SliceCopiedExt
source · [−]Expand description
Short hand analogous to Iter::copied
, where items of &T
are converted to T
via copy
.
use gazebo::prelude::*;
#[derive(Copy, Clone, Debug, PartialEq)]
struct X;
let x = [&X];
let y : Vec<X> = x.copied();
assert_eq!(y, vec![X]);
let x = vec![&X];
let y : Vec<X> = x.copied();
assert_eq!(y, vec![X]);