Image: TIFF encoder has unique return type

Created on 13 Oct 2019  路  2Comments  路  Source: image-rs/image

This happens with the encoder for TIFF: image::tiff::TiffEncoder;

Expected

encode() on any other encoder (bmp, ico, jpg, png) returns a Result<()>.

Actual behaviour

encode() on the tiff encoder returns so-called ImageResult<()>

Reproduction steps

https://docs.rs/image/0.22.3/image/tiff/struct.TiffEncoder.html
https://docs.rs/image/0.22.3/image/png/struct.PNGEncoder.html

bug easy

Most helpful comment

ImageResult<()> is actually IMO the right return type. The other encoders should be updated to return that as well. ImageError already implements From, so this should be hard change

All 2 comments

ImageResult<()> is actually IMO the right return type. The other encoders should be updated to return that as well. ImageError already implements From, so this should be hard change

This seems to be the interface complement of https://github.com/image-rs/image/issues/921. It's not a real duplicate though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

aschampion picture aschampion  路  3Comments

theotherphil picture theotherphil  路  3Comments

martinlindhe picture martinlindhe  路  6Comments

biot023 picture biot023  路  4Comments

fungos picture fungos  路  5Comments