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