pedrocr / rawloader

rust library to extract the raw data and some metadata from digital camera images
GNU Lesser General Public License v2.1
304 stars 53 forks source link

Upgrade to Rust 2018, fix deprecation warnings and errors #26

Closed runfalk closed 4 years ago

runfalk commented 4 years ago

This addresses https://github.com/pedrocr/imagepipe/issues/5 for rawloader.

pedrocr commented 4 years ago

This looks great, thanks. I'll have a closer look and then merge.

The only thing I don't really like is the deprecation of try!(), for a lot of code I like that it makes it more obvious than just ?. But since this is where the language went it's not a big deal.

runfalk commented 4 years ago

Yes, setting the edition to 2018 makes try! a hard error so it wasn't possible to keep it.

Though I like ? myself, so I'm happy :smile:.

pedrocr commented 4 years ago

To clarify I don't dislike ?. When it was standardized my conclusion was that it was really useful for a lot of places but in some I'd actually want the verbosity of try!() to make it clear to you what's happening. For example, a try!() in the middle of an expression makes it really clear that it will bail out early in some cases. But it's a minor thing.

pedrocr commented 4 years ago

Thanks!