diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb7ad5c5..94787d86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,6 +49,9 @@ jobs: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 + - uses: taiki-e/install-action@cargo-hack - run: cargo clippy --all-targets - run: cargo fmt --check --all - run: cargo doc --workspace --no-deps + - run: cargo hack check --each-feature -p svg2pdf + - run: cargo hack check --each-feature -p svg2pdf-cli diff --git a/src/util/helper.rs b/src/util/helper.rs index 8e520627..aabe3405 100644 --- a/src/util/helper.rs +++ b/src/util/helper.rs @@ -1,6 +1,8 @@ use pdf_writer::types::{BlendMode, LineCapStyle, LineJoinStyle, MaskType}; use pdf_writer::{Content, Name, Rect}; -use usvg::{LineCap, LineJoin, NonZeroRect, Size, Transform}; +use usvg::{LineCap, LineJoin, NonZeroRect, Transform}; +#[cfg(feature = "image")] +use usvg::Size; use crate::render::gradient::Stop;