rely on deriving traits instead
This commit is contained in:
@@ -1,22 +1,12 @@
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Buf {
|
||||
pub width: usize,
|
||||
pub height: usize,
|
||||
pub buf: Vec<f32>,
|
||||
}
|
||||
|
||||
impl Clone for Buf {
|
||||
fn clone(&self) -> Buf {
|
||||
Buf {
|
||||
width: self.width,
|
||||
height: self.height,
|
||||
buf: self.buf.clone(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Buf {
|
||||
pub fn new(width: usize, height: usize, buf: Vec<f32>) -> Self {
|
||||
pub const fn new(width: usize, height: usize, buf: Vec<f32>) -> Self {
|
||||
Buf { width, height, buf }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user