change unwrap to ? on write where result is returned

This commit is contained in:
James Dietz 2024-01-18 09:39:38 -05:00
parent c485ee7147
commit c13c746b47

View file

@ -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 { .. }