QuantumBadger / Speedy2D

Rust library for hardware accelerated drawing of 2D shapes, images, and text, with an easy to use API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Docs fail without the `image` feature

ProkopRandacek opened this issue · comments

Hello,

If I compile speedy2d with default-features = false and features = ["windowing"], I get this error when compiling the docs:

Documenting speedy2d v1.9.0
error[E0432]: unresolved import `image`
  --> /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/speedy2d-1.9.0/src/renderer2d.rs:22:5
   |
22 |     image::GenericImageView,
   |     ^^^^^ help: a similar path exists: `crate::image`
   |
   = note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>

error: Compilation failed, aborting rustdoc

For more information about this error, try `rustc --explain E0432`.
error: could not document `speedy2d`

Caused by:
  process didn't exit successfully: `rustdoc --edition=2018 --crate-type lib --crate-name speedy2d /home/prokop/.cargo/registry/src/github.com-1ecc6299db9ec823/speedy2d-1.9.0/src/lib.rs --cap-lints allow -o /home/prokop/code/lebka/target/doc --cfg 'feature="glutin"' --cfg 'feature="windowing"' --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --diagnostic-width=174 -C metadata=0f4b06b1efd68122 -L dependency=/home/prokop/code/lebka/target/debug/deps --extern backtrace=/home/prokop/code/lebka/target/debug/deps/libbacktrace-f976e4d006c8cf86.rmeta --extern earcutr=/home/prokop/code/lebka/target/debug/deps/libearcutr-a8bb252a308801ba.rmeta --extern gl=/home/prokop/code/lebka/target/debug/deps/libgl-ce71ddbef9510c40.rmeta --extern glow=/home/prokop/code/lebka/target/debug/deps/libglow-a36acde715df8845.rmeta --extern glutin=/home/prokop/code/lebka/target/debug/deps/libglutin-707d45c57c3d3961.rmeta --extern log=/home/prokop/code/lebka/target/debug/deps/liblog-e08e6005f620851e.rmeta --extern num_traits=/home/prokop/code/lebka/target/debug/deps/libnum_traits-7108a4925dc5891c.rmeta --extern rusttype=/home/prokop/code/lebka/target/debug/deps/librusttype-47f71766fd78dc97.rmeta --extern smallvec=/home/prokop/code/lebka/target/debug/deps/libsmallvec-95884ad3df096f0f.rmeta --extern unicode_normalization=/home/prokop/code/lebka/target/debug/deps/libunicode_normalization-06320636213135cd.rmeta --crate-version 1.9.0` (exit status: 1)

If I add the image feature the error goes away.