-
Notifications
You must be signed in to change notification settings - Fork 630
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
Discuss name of GenericImage::opt_pixel
#1243
Comments
I'll quote my original intention for choosing these names:
|
Does it have to return an option? We could also return say a |
Similar story, I think it should have the same signature as |
in this branch okaneco@710d044 and it passes tests locally. The relevant library changes occupy the first 55% of the page, below that is mainly GenericImageView::get_pixel to return Option<Self::Pixel> and GenericImage::get_pixel_mut to return Option<&mut P> |
try_get_pixel
is not perfect (it may indeed suggest that the return type is aResult
), but I think it conveys the meaning of what the function does better thanopt_get_pixel
. I wouldn't have guessed what the function behavior is just by its name.Originally posted by @lovasoa in #1229 (comment)
The text was updated successfully, but these errors were encountered: