We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae94de8 commit 8bba3ccCopy full SHA for 8bba3cc
src/sdl3/render.rs
@@ -1431,8 +1431,8 @@ impl<T: RenderTarget> Canvas<T> {
1431
/// Draws a rectangle on the current rendering target.
1432
/// Errors if drawing fails for any reason (e.g. driver failure)
1433
#[doc(alias = "SDL_RenderRect")]
1434
- pub fn draw_rect(&mut self, rect: FRect) -> Result<(), Error> {
1435
- let rect = rect.to_ll();
+ pub fn draw_rect<R: Into<FRect>>(&mut self, rect: R) -> Result<(), Error> {
+ let rect = rect.into().to_ll();
1436
1437
let result = unsafe { sys::render::SDL_RenderRect(self.context.raw, &rect) };
1438
if !result {
0 commit comments