Skip to content

Commit 916abae

Browse files
committed
cairo: Surface::create_similar_image should return an ImageSurface
This function is the counterpart of Surface::create_similar that explicitly returns an ImageSurface
1 parent 1f762ec commit 916abae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cairo/src/surface.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ impl Surface {
241241
format: Format,
242242
width: i32,
243243
height: i32,
244-
) -> Result<Surface, Error> {
244+
) -> Result<ImageSurface, Error> {
245245
unsafe {
246-
Self::from_raw_full(ffi::cairo_surface_create_similar_image(
246+
ImageSurface::from_raw_full(ffi::cairo_surface_create_similar_image(
247247
self.to_raw_none(),
248248
format.into(),
249249
width,

0 commit comments

Comments
 (0)