From 5cf56b778b4db277220a7306feb2a1967c12ccaa Mon Sep 17 00:00:00 2001 From: Sebastian K Date: Tue, 24 Jan 2023 10:45:22 +0100 Subject: [PATCH] fix names example --- pdf/examples/names.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pdf/examples/names.rs b/pdf/examples/names.rs index a1784496..233185a5 100644 --- a/pdf/examples/names.rs +++ b/pdf/examples/names.rs @@ -26,7 +26,7 @@ fn walk_outline(r: &impl Resolve, mut node: RcRef, name_map: &impl if let Some(ref dest) = node.dest { match dest { Primitive::String(ref s) => { - let name = s.to_string_lossy().unwrap(); + let name = s.to_string_lossy(); let page_nr = name_map(&name); println!("{}dest: {:?} -> page nr. {:?}", indent, name, page_nr); }