PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Refactor export for strict Clippy checks
Dylan M. Taylor5e75b9c3e6c4
diff --git a/crates/export/src/as_docx.rs b/crates/export/src/as_docx.rsindex d8fb84f7d..ab7451dc0 100644--- a/crates/export/src/as_docx.rs+++ b/crates/export/src/as_docx.rs@@ -1,6 +1,6 @@+use super::Zip;use super::as_html::esc;use super::layout::{Image, Item, Page, Table, body_size, items};-use super::*;/// A colour's 8-bit sRGB components (NaN and out-of-range values clamp; NaN reads as 0).pub(crate) fn rgb8(c: [f64; 3]) -> [u8; 3] {diff --git a/crates/export/src/as_rtf.rs b/crates/export/src/as_rtf.rsindex d7495df13..61585d82f 100644--- a/crates/export/src/as_rtf.rs+++ b/crates/export/src/as_rtf.rs@@ -1,7 +1,7 @@use super::as_docx::rgb8;use super::as_html::allowed;use super::layout::{Block, Item, Page, count_lookup_steps, items};-use super::*;+use std::collections::HashMap;fn rtf_text(s: &str) -> String {let mut o = String::new();diff --git a/crates/export/src/layout.rs b/crates/export/src/layout.rsindex 8a0605089..d1d074ac6 100644--- a/crates/export/src/layout.rs+++ b/crates/export/src/layout.rs@@ -1,4 +1,4 @@-use super::*;+use std::collections::HashMap;/// A paragraph of a page.#[derive(Clone, Debug, PartialEq)]diff --git a/crates/export/src/lib.rs b/crates/export/src/lib.rsindex cf32ea793..5275b0243 100644--- a/crates/export/src/lib.rs+++ b/crates/export/src/lib.rs@@ -10,8 +10,6 @@#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]-use std::collections::HashMap;-mod pptx;mod zip;