change unwrap to ?
on write where result is returned
This commit is contained in:
parent
c485ee7147
commit
c13c746b47
1 changed files with 2 additions and 2 deletions
|
@ -1116,10 +1116,10 @@ fn pre_fmt_projection(projection: &[PlaceElem<'_>], fmt: &mut Formatter<'_>) ->
|
||||||
| ProjectionElem::Subtype(_)
|
| ProjectionElem::Subtype(_)
|
||||||
| ProjectionElem::Downcast(_, _)
|
| ProjectionElem::Downcast(_, _)
|
||||||
| ProjectionElem::Field(_, _) => {
|
| ProjectionElem::Field(_, _) => {
|
||||||
write!(fmt, "(").unwrap();
|
write!(fmt, "(")?;
|
||||||
}
|
}
|
||||||
ProjectionElem::Deref => {
|
ProjectionElem::Deref => {
|
||||||
write!(fmt, "(*").unwrap();
|
write!(fmt, "(*")?;
|
||||||
}
|
}
|
||||||
ProjectionElem::Index(_)
|
ProjectionElem::Index(_)
|
||||||
| ProjectionElem::ConstantIndex { .. }
|
| ProjectionElem::ConstantIndex { .. }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue