erwanvivien / fast_qr

Ultra fast QRCode generation
https://fast-qr.com/
MIT License
209 stars 30 forks source link

Bumped `resvg` #11

Closed AntoniosBarotsis closed 1 year ago

AntoniosBarotsis commented 1 year ago

I've been using this crate in a personal project and I thought I'd contribute at least in some way.

Bumepd resvg to its latest version. I was getting an error in the benchmarks due to datamasking not being declared public although I'm not sure if that was intentional or not.

erwanvivien commented 1 year ago

Hello @AntoniosBarotsis thanks for contributing, indeed the datamasking module was not public, I was putting pub for benchmarks.

Could you please update pub to pub(crate) so that it does not appear in docs.rs ? Thanks in advance

AntoniosBarotsis commented 1 year ago

I was running into similar issues in my own crates, pub(crate) still has basically the same issue as declaring it private, is there a way around this or should I revert?

$ cargo c --bench qr
    Checking fast_qr v0.7.0 (C:\Users\anton\Documents\Github\fast_qr)
error[E0603]: module `datamasking` is private
  --> benches\qr.rs:68:18
   |
68 |     use fast_qr::datamasking::Mask;
   |                  ^^^^^^^^^^^ private module
   |
note: the module `datamasking` is defined here
  --> C:\Users\anton\Documents\Github\fast_qr\src\lib.rs:81:1
   |
81 | pub(crate) mod datamasking;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^

error[E0603]: module `datamasking` is private
  --> benches\qr.rs:82:32
   |
82 |             b.iter(|| fast_qr::datamasking::mask(&mut mat, mask))
   |                                ^^^^^^^^^^^ private module
   |
note: the module `datamasking` is defined here
  --> C:\Users\anton\Documents\Github\fast_qr\src\lib.rs:81:1
   |
81 | pub(crate) mod datamasking;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0603`.
error: could not compile `fast_qr` due to 2 previous errors
AntoniosBarotsis commented 1 year ago

We could alternatively do

#[doc(hidden)]
pub mod datamasking;
erwanvivien commented 1 year ago

Wow, thanks for testing, this is not good 😞 We will probably have to go with:

#[doc(hidden)]
pub mod datamasking;
AntoniosBarotsis commented 1 year ago

Nice timing 😆

erwanvivien commented 1 year ago

Haha, thanks Antonios, merged