Skip to content

Commit

Permalink
change unwrap to ? on write where result is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
mj10021 committed Jan 18, 2024
1 parent c485ee7 commit c13c746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/rustc_middle/src/mir/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1116,10 +1116,10 @@ fn pre_fmt_projection(projection: &[PlaceElem<'_>], fmt: &mut Formatter<'_>) ->
| ProjectionElem::Subtype(_)
| ProjectionElem::Downcast(_, _)
| ProjectionElem::Field(_, _) => {
write!(fmt, "(").unwrap();
write!(fmt, "(")?;
}
ProjectionElem::Deref => {
write!(fmt, "(*").unwrap();
write!(fmt, "(*")?;
}
ProjectionElem::Index(_)
| ProjectionElem::ConstantIndex { .. }
Expand Down

0 comments on commit c13c746

Please sign in to comment.