diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 788bd3f..6015643 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,6 +42,9 @@ jobs: - name: Add target run: | rustup target add ${{ matrix.target }} + - name: Clippy check + run: | + cargo clippy - name: Build mdbook-pdf Release run: | cargo build --release --target ${{ matrix.target }} diff --git a/.gitignore b/.gitignore index fce6c3a..1b38838 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.DS_Store /.vagrant /build /dist diff --git a/Cargo.toml b/Cargo.toml index 222940d..baf923e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,11 +19,11 @@ include = [ env_logger = "0" lazy_static = "1" mdbook = "0" -mdbook-pdf-headless_chrome = "0" +headless_chrome = "1" regex = "1" serde = "1" serde_derive = "1" [features] # Enables auto fetching chromium support. -fetch = ["mdbook-pdf-headless_chrome/fetch"] +fetch = ["headless_chrome/fetch"] diff --git a/src/main.rs b/src/main.rs index f3e7b89..ffbe6ea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -62,11 +62,10 @@ fn main() -> Result<(), Box> { print_html_path ); println!("Verify output.html is active and output.html.print.enabled is set to true in your book.toml."); - return Err(Box::try_from(io::Error::new( + return Err(Box::::from(io::Error::new( io::ErrorKind::NotFound, format!("File not found: {}", print_html_path), - )) - .unwrap()); + ))); } // Modify the print.html for custom JS scripts as well as links outside the book.