crate does not re-export `bstr`, therefore requires users to add this dependency
pickx opened this issue · comments
hey, on my machine this example
use unfmt::unformat;
fn main() {
unformat!("hello", world);
}
in Cargo.toml
:
[dependencies]
unfmt = { git = "https://github.com/mathematic-inc/unfmt.git" }
...results in
error[E0432]: unresolved import `bstr`
I believe this is because the macro expansion includes use ::bstr::{ByteSlice, BStr};
.
this means a user would need to add bstr
as a dependency - see this Stack Overflow question.
afaik, there are ways to deal with this, such as re-exporting.
Looks like there is no solution to this at the moment. See rust-lang/rust#54363
We recommend just adding bstr
as a dependency as the usage by this library is zero-cost.