From 81c2488a09d3536fcdc6d41d194c372eef6352c7 Mon Sep 17 00:00:00 2001 From: arnav-hiwarkar Date: Fri, 6 Nov 2026 05:07:25 +0530 Subject: [PATCH] craft-print: document spooler_list Co-Authored-By: Claude Opus 5.5 --- crates/print/src/windows.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/print/src/windows.rs b/crates/print/src/windows.rs index cf598d75..b11f14f0 100644 --- a/crates/print/src/windows.rs +++ b/crates/print/src/windows.rs @@ -53,6 +53,9 @@ pub(crate) fn printer_queues() -> Vec { spooler_list(|_| None) } +/// The spooler's queues (`EnumPrinters`, local queues and connections) with the default marked, +/// each given the two-sided support `two_sided` reports for it; empty when the spooler can't list +/// them. fn spooler_list(two_sided: impl Fn(&PrinterDevice) -> Option) -> Vec { match PrinterDevice::all() { Ok(devices) => crate::printer_list(devices.iter().map(|d| (d.name().to_string(), two_sided(d))), default_printer().as_deref()),