ajrcarey / pdfium-render

A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project.
https://crates.io/crates/pdfium-render
Other
364 stars 59 forks source link

chrono error #160

Closed cyberdoors closed 2 months ago

cyberdoors commented 2 months ago
26 use chrono::{DateTime, Utc}; ^^^
no Utc in the root
help: a similar name exists in the module: UTC

error[E0432]: unresolved import chrono::Utc

cargo tree

chrono v0.3.0 └── pdfium-render v0.8.25 (https://github.com/ajrcarey/pdfium-render.git#376bc4ba) (*)

chrono v0.4.38 └── text_analysis v0.3.4

ajrcarey commented 2 months ago

Hi @cyberdoors , thank you for reporting the issue.

chrono v0.3.0 is seven years old at this point. Is there a reason you're locked to such an old version?

I think the simplest solution is to change the chrono dependency entry in Cargo.toml to chrono = "0.4, <= 0.4.31" to establish a minimum bound of 0.4.0.

ajrcarey commented 2 months ago

It's odd because if I force a downgrade to chrono 0.3.0, cargo update with a chrono dependency of "<= 0.4.31" upgrades to 0.4.31 without complaint. But anyway, to avoid any possibility of failure, I suggest updating to "0.4, <= 0.4.31" as I mentioned above.

ajrcarey commented 2 months ago

As there have been no further comments and I believe the issue is resolved, I will shortly close the issue. Feel free to reopen if you feel the issue has not been resolved.

Patched will be included in release of crate version 0.8.25.