Skip to content

Commit 542b7c9

Browse files
Rename CoreGraphicsImage::as_ref to CoreGraphicsImage::aas_cgimage so as to not conflict with as_ref trait
1 parent f5abbb1 commit 542b7c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

piet-coregraphics/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ impl CoreGraphicsImage {
134134
false => CoreGraphicsImage::YUp(image),
135135
}
136136
}
137-
pub fn as_ref(&self) -> Option<&CGImage> {
137+
pub fn as_cgimage(&self) -> Option<&CGImage> {
138138
match self {
139139
CoreGraphicsImage::Empty => None,
140140
CoreGraphicsImage::YUp(image) | CoreGraphicsImage::YDown(image) => Some(image),
@@ -758,7 +758,7 @@ mod tests {
758758
.capture_image_area(Rect::new(100.0, 100.0, 200.0, 200.0))
759759
.unwrap();
760760

761-
let unwrapped_copy = copy.as_ref().unwrap();
761+
let unwrapped_copy = copy.as_cgimage().unwrap();
762762
let rewrapped_copy = CoreGraphicsImage::from_cgimage_and_ydir(unwrapped_copy.clone(), true);
763763

764764
piet.draw_image(

0 commit comments

Comments
 (0)