Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 7a68021

Browse files
committed
Replace some unwraps with ?s where possible
1 parent 29d97cd commit 7a68021

File tree

1 file changed

+2
-2
lines changed
  • src/librustdoc/html/render

1 file changed

+2
-2
lines changed

src/librustdoc/html/render/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ fn document(
538538
}
539539

540540
fmt::from_fn(move |f| {
541-
document_item_info(cx, item, parent).render_into(f).unwrap();
541+
document_item_info(cx, item, parent).render_into(f)?;
542542
if parent.is_none() {
543543
write!(f, "{}", document_full_collapsible(item, cx, heading_offset))
544544
} else {
@@ -582,7 +582,7 @@ fn document_short(
582582
show_def_docs: bool,
583583
) -> impl fmt::Display {
584584
fmt::from_fn(move |f| {
585-
document_item_info(cx, item, Some(parent)).render_into(f).unwrap();
585+
document_item_info(cx, item, Some(parent)).render_into(f)?;
586586
if !show_def_docs {
587587
return Ok(());
588588
}

0 commit comments

Comments
 (0)