From 7c6b24cae09b1d3f647d3622767da2b38843b065 Mon Sep 17 00:00:00 2001 From: Antoni Spaanderman <56turtle56@gmail.com> Date: Tue, 30 Apr 2024 07:27:49 +0200 Subject: [PATCH] fix function docs of Palette::new see https://wiki.libsdl.org/SDL2/SDL_AllocPalette --- src/sdl2/pixels.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sdl2/pixels.rs b/src/sdl2/pixels.rs index 765782197f..5cca5a0e50 100644 --- a/src/sdl2/pixels.rs +++ b/src/sdl2/pixels.rs @@ -10,7 +10,9 @@ pub struct Palette { impl Palette { #[inline] - /// Creates a new, uninitialized palette + /// Create a palette structure with the specified number of color entries. + /// + /// The palette entries are initialized to white. #[doc(alias = "SDL_AllocPalette")] pub fn new(mut capacity: usize) -> Result { use crate::common::*;