PdfCraft: An open-source PDF reader and editor written by scratch in pure Rust
Refactor organize for strict Clippy checks
Dylan M. Taylorf40a57878b99
diff --git a/crates/organize/src/import/carry.rs b/crates/organize/src/import/carry.rsindex 21c21b9be..15a412e23 100644--- a/crates/organize/src/import/carry.rs+++ b/crates/organize/src/import/carry.rs@@ -1,5 +1,5 @@use super::copy::Copier;-use super::*;+use super::{Dict, Document, HashMap, HashSet, ObjRef, Object, OrganizeError, name_tree_entries};/// Copy a source's document-level attachments (`/Names /EmbeddedFiles`) into `dst`.pub(super) fn collect_attachments(dst: &mut Document, src: &Document, out: &mut Vec<(Vec<u8>, Object)>) -> Result<(), OrganizeError> {diff --git a/crates/organize/src/import/combine.rs b/crates/organize/src/import/combine.rsindex 09a1b0725..06972ae10 100644--- a/crates/organize/src/import/combine.rs+++ b/crates/organize/src/import/combine.rs@@ -1,5 +1,5 @@use super::carry::{Mark, add_outline, collect_attachments, kept_bookmarks, set_attachments, source_outline, write_outline_level};-use super::*;+use super::{Dict, Document, FieldConflicts, HashMap, ObjRef, Object, OrganizeError, import_pages_mapped, rebuild};/// A new document containing copies of `pages` from `src` (Extract Pages / Split)./// Document information (title, author…) is carried over, and so is the print standard thediff --git a/crates/organize/src/import/copy.rs b/crates/organize/src/import/copy.rsindex f78411806..f4b549962 100644--- a/crates/organize/src/import/copy.rs+++ b/crates/organize/src/import/copy.rs@@ -1,4 +1,4 @@-use super::*;+use super::{Dict, Document, HashMap, ObjRef, Object, OrganizeError, named_dest};/// Keys that must not be followed when copying: they point back up or across the source/// document, and following them would drag in unrelated objects.diff --git a/crates/organize/src/import/fields.rs b/crates/organize/src/import/fields.rsindex 98f69c69e..44910d040 100644--- a/crates/organize/src/import/fields.rs+++ b/crates/organize/src/import/fields.rs@@ -1,5 +1,5 @@use super::copy::WIDGET_KEYS;-use super::*;+use super::{Dict, Document, HashMap, HashSet, ObjRef, Object, OrganizeError, walk};/// Rename the top-level fields about to be registered in `dst` whose fully-qualified names/// (`parent.T.child`) are already taken, so each imported field stays its own field instead of