diff options
| author | James Dietz <jamesthespeedy@gmail.com> | 2024-01-18 09:39:38 -0500 |
|---|---|---|
| committer | James Dietz <jamesthespeedy@gmail.com> | 2024-01-18 10:11:04 -0500 |
| commit | c13c746b477cfa3887bd88236c452bb57048f6c6 (patch) | |
| tree | 8a2812d9e3846569aa3b9155af32232408f6adcb /compiler/rustc_middle/src | |
| parent | c485ee71477a29041895c47cc441b364670f3772 (diff) | |
| download | rust-c13c746b477cfa3887bd88236c452bb57048f6c6.tar.gz rust-c13c746b477cfa3887bd88236c452bb57048f6c6.zip | |
change unwrap to `?` on write where result is returned
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/mir/pretty.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/mir/pretty.rs b/compiler/rustc_middle/src/mir/pretty.rs index 239929a2c0e..f74715468a0 100644 --- a/compiler/rustc_middle/src/mir/pretty.rs +++ b/compiler/rustc_middle/src/mir/pretty.rs @@ -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 { .. } |
