Skip to content

Commit f492072

Browse files
ElliotSisskcq-be@skia-corp.google.com.iam.gserviceaccount.com
authored andcommitted
Fix compile error with recent Rust toolchains in Rust PNG FFI
Looks like there is a build error when building with the Android Rust toolchain: ``` error: cannot explicitly borrow within an implicitly-borrowing pattern --> external/skia/rust/png/FFI.rs:929:44 | 929 | let Some(png::InterlaceInfo::Adam7(ref adam7info)) = self.last_interlace_info.as_ref() | ^^^ explicit `ref` binding modifier not allowed when implicitly borrowing ``` This is likely due to the toolchain being more recent BUG=502195264 Change-Id: I0442821337ddb7af96cf352d3a6d201a8e181296 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1277336 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Elliot Sisteron <elliotsisteron@google.com>
1 parent 2a22e8b commit f492072

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

rust/png/FFI.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -924,8 +924,7 @@ impl Reader {
924924
row: &[u8],
925925
bits_per_pixel: u8,
926926
) {
927-
let Some(png::InterlaceInfo::Adam7(ref adam7info)) = self.last_interlace_info.as_ref()
928-
else {
927+
let Some(png::InterlaceInfo::Adam7(adam7info)) = self.last_interlace_info.as_ref() else {
929928
panic!("This function should only be called after decoding an interlaced row");
930929
};
931930
png::expand_interlaced_row(img, img_row_stride, row, adam7info, bits_per_pixel);

0 commit comments

Comments
 (0)