diff --git a/src/printer/device.rs b/src/printer/device.rs index fbfa2ab..e0bc508 100644 --- a/src/printer/device.rs +++ b/src/printer/device.rs @@ -19,7 +19,7 @@ pub struct PrinterDevice { /// Represents an error occurred while enumerating printer devices. pub enum EnumDeviceError { /// Failed to enum printer device. - #[error("Failed to enum printer device: {0}")] + #[error("Failed to enum printer device")] FailedToEnumPrinterDevice(#[source] windows::core::Error), } diff --git a/src/printer/pdfium.rs b/src/printer/pdfium.rs index 2434643..4064778 100644 --- a/src/printer/pdfium.rs +++ b/src/printer/pdfium.rs @@ -27,10 +27,10 @@ pub enum PdfiumPrinterError { #[error("Failed to open printer")] FailedToOpenPrinter, /// File I/O error. - #[error("File I/O error: {0}")] + #[error("File I/O error")] FileIOError(#[source] std::io::Error), /// Print ticket error. - #[error("Print Ticker Error: {0}")] + #[error("Print Ticker Error")] PrintTicketError(#[source] ToDevModeError), } diff --git a/src/printer/xps.rs b/src/printer/xps.rs index a81d110..90e4050 100644 --- a/src/printer/xps.rs +++ b/src/printer/xps.rs @@ -20,19 +20,19 @@ use windows::{ /// Represents an error from [`XpsPrinter`]. pub enum XpsPrinterError { /// Failed to create event. - #[error("Failed to create event: {0}")] + #[error("Failed to create event")] FailedToCreateEvent(#[source] windows::core::Error), /// Failed to create object factory. - #[error("Failed to create object factory: {0}")] + #[error("Failed to create object factory")] FailedToCreateObjectFactory(#[source] windows::core::Error), /// Failed to start job. - #[error("Failed to start job: {0}")] + #[error("Failed to start job")] FailedToStartJob(#[source] windows::core::Error), /// Failed to apply print ticket. - #[error("Failed to apply print ticket: {0}")] + #[error("Failed to apply print ticket")] FailedToApplyPrintTicket(#[source] windows::core::Error), /// Failed to write document. - #[error("Failed to write document: {0}")] + #[error("Failed to write document")] FailedToWriteDocument(#[source] windows::core::Error), /// Stream is not available. #[error("Stream is not available")] diff --git a/src/ticket/builder.rs b/src/ticket/builder.rs index 0a519ff..2313608 100644 --- a/src/ticket/builder.rs +++ b/src/ticket/builder.rs @@ -25,16 +25,16 @@ pub struct PrintTicketBuilder { /// Represents an error occurred while building a print ticket. pub enum PrintTicketBuilderError { /// Failed to open print ticket provider. - #[error("Failed to open print ticket provider: {0}")] + #[error("Failed to open print ticket provider")] OpenProviderFailed(#[source] windows::core::Error), /// Stream not allocated. #[error("Stream not allocated")] StreamNotAllocated, /// Failed to merge print tickets. - #[error("Failed to merge print tickets: {0}")] + #[error("Failed to merge print tickets")] MergePrintTicketsFailed(String, #[source] windows::core::Error), /// Failed to decode print ticket. - #[error("Failed to decode print ticket: {0}")] + #[error("Failed to decode print ticket")] DecodePrintTicketFailed(#[source] windows::core::Error), } diff --git a/src/ticket/document/reader.rs b/src/ticket/document/reader.rs index 4ce0078..b93a4ac 100644 --- a/src/ticket/document/reader.rs +++ b/src/ticket/document/reader.rs @@ -17,7 +17,7 @@ use xml::{ /// Represents an error occurred while parsing print schema. pub enum ParsePrintSchemaError { /// Invalid XML. - #[error("Invalid xml: {0}")] + #[error("Invalid xml")] InvalidXml(#[source] xml::reader::Error), /// Invalid print schema. #[error("Invalid print schema: (at {pos}) {reason}")] diff --git a/src/ticket/print_capabilities.rs b/src/ticket/print_capabilities.rs index a19d75d..f625028 100644 --- a/src/ticket/print_capabilities.rs +++ b/src/ticket/print_capabilities.rs @@ -27,19 +27,19 @@ use xml::name::OwnedName; /// Represents an error occurred while fetching print capabilities. pub enum FetchPrintCapabilitiesError { /// Failed to open print ticket provider. - #[error("Failed to open print ticket provider: {0}")] + #[error("Failed to open print ticket provider")] OpenProviderFailed(#[source] windows::core::Error), /// Stream not allocated. #[error("Stream not allocated")] StreamNotAllocated, /// Cannot get print capabilities. - #[error("Cannot get print capabilities: {0}")] + #[error("Cannot get print capabilities")] CannotGetPrintCapabilities(String, #[source] windows::core::Error), /// Failed to read stream. - #[error("Failed to read stream: {0}")] + #[error("Failed to read stream")] ReadStreamFailed(#[source] windows::core::Error), /// Failed to parse print capabilities. - #[error("Failed to parse print capabilities: {0}")] + #[error("Failed to parse print capabilities")] ParseError(#[source] ParsePrintSchemaError), } diff --git a/src/ticket/print_ticket.rs b/src/ticket/print_ticket.rs index 186d515..02f83c7 100644 --- a/src/ticket/print_ticket.rs +++ b/src/ticket/print_ticket.rs @@ -42,16 +42,16 @@ impl Default for PrintTicket { /// Represents an error occurred while converting print ticket to dev mode. pub enum ToDevModeError { /// Failed to open print ticket provider. - #[error("Failed to open print ticket provider: {0}")] + #[error("Failed to open print ticket provider")] OpenProviderFailed(#[source] windows::core::Error), /// Stream not allocated. #[error("Stream not allocated")] StreamNotAllocated, /// Failed to convert print ticket to dev mode. - #[error("Failed to convert print ticket to dev mode: {0}")] + #[error("Failed to convert print ticket to dev mode")] ConvertPrintTicketToDevModeFailed(String, #[source] windows::core::Error), /// Failed to open printer. - #[error("Failed to open printer: {0}")] + #[error("Failed to open printer")] FailedToOpenPrinter(#[source] windows::core::Error), /// Failed to correct dev mode via [`DocumentProperties`]. ///