Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bitmap: Add try_format() to AndroidBitmapInfo to handle unexpected formats without panicking #395

Merged
merged 2 commits into from
Aug 9, 2023

Conversation

dcsommer
Copy link
Contributor

@dcsommer dcsommer commented Jun 7, 2023

We have observed panics in practice for this API due to unexpected formats. We need to compare the format without panicking.

@MarijnS95 MarijnS95 changed the title Add fallible version of format(): try_format() bitmap: Add fallible version of format(): try_format() Jun 7, 2023
@MarijnS95
Copy link
Member

A doc-comment might be nice too, pointing the user in the right direction.

@MarijnS95
Copy link
Member

@dcsommer can you still add a doc-comment and changelog entry?

@dcsommer
Copy link
Contributor Author

dcsommer commented Aug 9, 2023 via email

@MarijnS95 MarijnS95 changed the title bitmap: Add fallible version of format(): try_format() bitmap: Add try_format() to AndroidBitmapInfo to handle unexpected formats without panicking Aug 9, 2023
ndk/CHANGELOG.md Outdated Show resolved Hide resolved
ndk/src/bitmap.rs Outdated Show resolved Hide resolved
We have observed panics in practice for this API due to unexpected formats. We need to compare the format without panicking.
@MarijnS95 MarijnS95 merged commit e66b4fd into rust-mobile:master Aug 9, 2023
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants