jrmuizel / pdf-extract

A rust library for extracting content from pdfs
396 stars 78 forks source link

Apply fix-ups and fix warnings #18

Closed oleid closed 4 years ago

oleid commented 4 years ago

Hey,

I just stumbled across this repository and I think I might find that crate useful in future. Thus, I took the liberty to fix a bunch of warnings the compiler displayed during compilation.

There seem to be lots of unused functions. Some were obviously not needed, but others are not obvious, since they might be needed in future. I silenced the warnings for these.

Also, I took the liberty to introduce an Error type and make all the trait functions return a Result. I think that will be useful for proper error propagation.

The code is unformatted. Usually, I run cargo format --all on my rust code, but for easier review, I didn't do that here.

Hope you find those changes useful,

Kind regards, Olaf