Closed jerryajay closed 2 years ago
Yeah, this happens when crates contain a dash in the name. A dash isn't valid in a Rust identifier so the compiler requires you to type an underscore in the source code. Cargo is fine with a dash though.
This is the same for cortex-m, cortex-m-rt, etc. It's just one of those things I'm afraid.
The name of the crate is :
pc-keyboard
(notice the dash) While usage, I had to use it as:pc_keyboard
(notice the underscore)It is a issue because when I encountered your crate, i made the dependency entry in my Cargo.toml as
pc_keyboard = [ver]
just to discover that the Cargo paniced and the right name beingpc-keyboard
.