core/frame: drop unneeded mut
authorKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 2 Mar 2022 17:31:00 +0000 (18:31 +0100)
committerKostya Shishkov <kostya.shishkov@gmail.com>
Wed, 2 Mar 2022 17:31:00 +0000 (18:31 +0100)
nihav-core/src/frame.rs

index 1ba361041c11c43c584c342a5bfd694ef0a78e0d..7a09be4c25dfb5076962e18675dd2106ad133226 100644 (file)
@@ -168,7 +168,7 @@ impl<T: Clone> NAVideoBuffer<T> {
     /// Returns the number of components in picture format.
     pub fn get_num_components(&self) -> usize { self.offs.len() }
     /// Creates a copy of current `NAVideoBuffer`.
     /// Returns the number of components in picture format.
     pub fn get_num_components(&self) -> usize { self.offs.len() }
     /// Creates a copy of current `NAVideoBuffer`.
-    pub fn copy_buffer(&mut self) -> Self {
+    pub fn copy_buffer(&self) -> Self {
         let mut data: Vec<T> = Vec::with_capacity(self.data.len());
         data.clone_from(self.data.as_ref());
         let mut offs: Vec<usize> = Vec::with_capacity(self.offs.len());
         let mut data: Vec<T> = Vec::with_capacity(self.data.len());
         data.clone_from(self.data.as_ref());
         let mut offs: Vec<usize> = Vec::with_capacity(self.offs.len());