cargo-docserver icon indicating copy to clipboard operation
cargo-docserver copied to clipboard

Chooses wrong crate by default

Open asomers opened this issue 4 years ago • 0 comments

While developing, I usually use the --no-deps option to cargo doc. That usually means that when using cargo docserver, http:://myhostname:4000 redirects me to a blank "not found" page, because by default it seems to choose the alphabetically lowest ordered crate from within all of my dependencies. Obviously, those dependencies' docs won't be present if I use --no-deps. Worse, cargo docserver seems to include dev-dependencies in that list. Those aren't present even when not using --no-deps. Instead, cargo docserver should be default redirect to the current directory's crate, the first crate whose documentation is found, or a landing page showing all available crates.

asomers avatar Sep 12 '21 23:09 asomers