mirror of
https://github.com/storytold/pdfcraft.git
synced 2026-10-14 19:27:04 -04:00
Merge pull request #24 from storytold/pr/never-crash-attrs
Never crash: deny the panic lints in crates that are already clean
This commit is contained in:
11 files changed
+22
No files matched your search
@@ -12,6 +12,8 @@
|
||||
//! Every edit mutates a `printcraft_cos::Document` (copy-on-write); callers snapshot it first
|
||||
//! for undo. Keys we do not understand are left alone.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
use printcraft_cos::{Dict, Document, ObjRef, Object, PdfString};
|
||||
|
||||
pub mod appearance;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
//! grouped into [`Change`]s — inserted, deleted or replaced runs of words — each with the
|
||||
//! rectangles to highlight on the old and new pages.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
/// A word of one document.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Word {
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
//! [`Parsed::skipped`]) instead of failing the whole stream, and it never panics. Inline images
|
||||
//! (`BI … ID … EI`) are kept whole, so a parse → serialize round trip preserves them.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
use printcraft_cos::{Dict, Lexer, Object, PdfString, serialize};
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
//! incremental and full writing. Not yet: encryption (M1.6), object-stream / xref-stream output
|
||||
//! for full saves, linearization (M11).
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
mod document;
|
||||
mod object;
|
||||
mod parser;
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
//! document: headings are the paragraphs set larger than the body text, and images sit where
|
||||
//! they fall between paragraphs.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
mod zip;
|
||||
|
||||
pub use zip::Zip;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
//! PDF user space is y-up with the origin at the bottom-left of the page; view space is y-down.
|
||||
//! `PageRect` is always in PDF user space (points, 1/72 inch).
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
/// An axis-aligned rectangle in PDF user space (points).
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Default)]
|
||||
pub struct PageRect {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
//! printcraft-model — typed views over the PDF object graph (L2). See the README.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
use printcraft_cos::{Dict, Document, ObjRef, Object};
|
||||
|
||||
/// Attributes a page inherits from its ancestors (ISO 32000-2 §7.7.3.4).
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
//!
|
||||
//! The models read the Latin alphabet (English and other languages written without accents).
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
pub use printcraft_fonts::helvetica_width;
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
//! intent, forbidden actions, annotation flags, Interpolate, NeedAppearances, encryption) and
|
||||
//! returns what remains. Fonts that aren't embedded can't be fixed here.
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
pub mod icc;
|
||||
mod xmp;
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
//! The sheets are written as a new, unencrypted, garbage-collected PDF; [`spool`] hands it to
|
||||
//! the system's print spooler (CUPS on macOS and Linux).
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
use printcraft_content::Matrix;
|
||||
use printcraft_cos::{Dict, Document, ObjRef, Object, SaveOptions, Stream, write_full};
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
//! A verification pass then re-reads every redacted page; if any glyph or inline image is still
|
||||
//! under a region the whole operation fails (callers keep the previous document: fail-closed).
|
||||
|
||||
#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic, clippy::unimplemented, clippy::todo, clippy::unreachable)]
|
||||
|
||||
use printcraft_cos::{Dict, Document, ObjRef, Object, Stream};
|
||||
|
||||
mod image;
|
||||
|
||||
Reference in new issue
Block a user