Closed kenkoooo closed 4 years ago
I prefer exposing functions/structs directly in like ac_library_rs::FenwickTree
by re-exporting in lib.rs
https://github.com/rust-lang-ja/ac-library-rs/blob/5809126cdbb8dcd3a632e5f114aa81202ef9d44c/src/lib.rs#L14
to ac_library_rs::fenwick_tree::FenwickTree
.
That's because ACL adopts the same policy. (using namespace atcoder;
imports everything.)
I'd like to hear what other contributors think.
As a compromise, we have an another option to add src/prelude.rs
.
That adapts to the policy of original ACL, I think. (as it is intended to be used with using namespace atcoder;
)
pub use crate::fenwicktree::FenwickTree;
We also have to take into consideration that this crate will be unlikely introduced to the system of AtCoder.
https://twitter.com/chokudai/status/1303025509488496645
The users have to expand the code with some tool. (e.g. hatoo/cargo-snippet, shino16/cargo-auto-bundle, qryxip/cargo-equip)
Thanks. That makes sense to me. Let me make pub mod
s private.
let us merge.
Add
internal_***
modules intolib.rs
and fix the visibility of modules like the following:mod
topub mod
so that the users can import them.~pub(crate) mod
to allow other modules can use them internally.