use crate::octave::Octave;
impl<T> Octave<&T> {
pub fn cloned(&self) -> Octave<T>
where
T: Clone,
{
Octave(self.0.clone())
}
pub const fn copied(&self) -> Octave<T>
where
T: Copy,
{
Octave(*self.0)
}
}
impl<T> Octave<&mut T> {
pub fn cloned(&self) -> Octave<T>
where
T: Clone,
{
Octave(self.0.clone())
}
pub const fn copied(&self) -> Octave<T>
where
T: Copy,
{
Octave(*self.0)
}
}
impl<T> Octave<*const T> {
pub const fn copied(&self) -> Octave<T>
where
T: Copy,
{
unsafe { Octave(*self.0) }
}
}