]> git.nihav.org Git - nihav.git/blobdiff - nihav-core/src/compr/mod.rs
armovie: zero-terminated string is not exactly an error
[nihav.git] / nihav-core / src / compr / mod.rs
index c8069b5cc194325e75050f591d8e8671fa52f6cc..a2062d497be3246ac92bb2b56b6b4c6ebab0abed 100644 (file)
@@ -1,5 +1,6 @@
 //! Various compression formats support.
 #[cfg(feature="deflate")]
+#[allow(clippy::manual_range_contains)]
 pub mod deflate;
 
 use crate::io::byteio::ByteIOError;
@@ -54,8 +55,8 @@ impl From<CodebookError> for DecompressError {
     }
 }
 
-///! Copies requested amount of bytes from previous position in the same buffer.
-///! If source area overlaps with destination area already copied values should be used e.g. copying with offset 1 means essentially to repeat previous byte requested number of times.
+/// Copies requested amount of bytes from previous position in the same buffer.
+/// If source area overlaps with destination area already copied values should be used e.g. copying with offset 1 means essentially to repeat previous byte requested number of times.
 pub fn lz_copy(buf: &mut [u8], dst_pos: usize, offset: usize, len: usize) {
     if dst_pos < offset {
         panic!("Copy offset is before buffer start.");
@@ -64,7 +65,7 @@ pub fn lz_copy(buf: &mut [u8], dst_pos: usize, offset: usize, len: usize) {
     let buf = &mut buf[ipos..];
     if ipos + len <= dst_pos {
         let (src, dst) = buf.split_at_mut(offset);
-        (&mut dst[..len]).copy_from_slice(&src[..len]);
+        dst[..len].copy_from_slice(&src[..len]);
     } else {
         for i in 0..len {
             buf[offset + i] = buf[i];