message: use custom slice::copy_within implementation in ImageBuffer::copy_within
diff: @@ -937,7 +937,7 @@ where
  let Range { start, .. } = self.pixel_indices_unchecked(fx, sy);
  let Range { end, .. } = self.pixel_indices_unchecked(fx + width - 1, sy);
  let dst = self.pixel_indices_unchecked(tx, dy).start;
  - (&mut **self).copy_within(start..end, dst);
  + slice_copy_within(self, start..end, dst);
  }
  } else {
  for y in 0..height {
  @@ -946,7 +946,7 @@ where
  let Range { start, .. } = self.pixel_indices_unchecked(fx, sy);
  let Range { end, .. } = self.pixel_indices_unchecked(fx + width - 1, sy);
  let dst = self.pixel_indices_unchecked(tx, dy).start;
  - (&mut **self).copy_within(start..end, dst);
  + slice_copy_within(self, start..end, dst);
  }
  }
  true
  @@ -957,6 +957,24 @@ where
  }
  }
  +// FIXME non-generic `core::slice::copy_within` implementation used by `ImageBuffer::copy_within`. The implementation is rewritten
  +// here due to minimum rust version support(MSRV). Image has a MSRV of 1.34 as of writing this while `core::slice::copy_within`
  +// has been stabilized in 1.37.
  +#[inline(always)]
  +fn slice_copy_within<T: Copy>(slice: &mut [T], Range { start: src_start, end: src_end}: Range<usize>, dest: usize) {
  + assert!(src_start <= src_end, "src end is before src start");
  + assert!(src_end <= slice.len(), "src is out of bounds");
  + let count = src_end - src_start;
  + assert!(dest <= slice.len() - count, "dest is out of bounds");
  + unsafe {
  + std::ptr::copy(
  + slice.as_ptr().add(src_start),
  + slice.as_mut_ptr().add(dest),
  + count,
  + );
  + }
  +}
  +
  // concrete implementation for `Vec`-backed buffers
  // TODO: I think that rustc does not "see" this impl any more: the impl with
  // Container meets the same requirements. At least, I got compile errors that
  