From ed92acb021dbbcbe305c98e1469bd7c62c0be7ac Mon Sep 17 00:00:00 2001 From: bendn Date: Mon, 2 Oct 2023 19:33:47 +0700 Subject: [PATCH] fix incorrect safety doc --- src/overlay.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/overlay.rs b/src/overlay.rs index d85d384..7f2715c 100644 --- a/src/overlay.rs +++ b/src/overlay.rs @@ -238,10 +238,6 @@ impl ClonerOverlay<4, 3> for ImageCloner<'_, 3> { impl, U: Deref> OverlayAt> for Image { #[inline] - /// Overlay with => self at coordinates x, y, without blending - /// - /// # Safety - /// - UB if x, y is out of bounds unsafe fn overlay_at(&mut self, with: &Image, x: u32, y: u32) -> &mut Self { for j in 0..with.height() { for i in 0..with.width() { @@ -262,12 +258,6 @@ impl, U: Deref> OverlayAt> impl ClonerOverlayAt<4, 4> for ImageCloner<'_, 4> { #[inline] #[must_use = "function does not modify the original image"] - /// Overlay with => self at coordinates x, y, without blending, returning a new Image - /// - /// # Safety - /// - UB if x, y is out of bounds - /// - UB if x + with.width() > [`u32::MAX`] - /// - UB if y + with.height() > [`u32::MAX`] unsafe fn overlay_at(&self, with: &Image<&[u8], 4>, x: u32, y: u32) -> Image, 4> { let mut out = self.dup(); // SAFETY: same