Adopt let else in more places
This commit is contained in:
@@ -274,11 +274,9 @@ where
|
||||
use std::io::{self, Write};
|
||||
|
||||
let def_id = body.source.def_id();
|
||||
let attrs = match RustcMirAttrs::parse(tcx, def_id) {
|
||||
Ok(attrs) => attrs,
|
||||
|
||||
let Ok(attrs) = RustcMirAttrs::parse(tcx, def_id) else {
|
||||
// Invalid `rustc_mir` attrs are reported in `RustcMirAttrs::parse`
|
||||
Err(()) => return Ok(()),
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let mut file = match attrs.output_path(A::NAME) {
|
||||
|
||||
@@ -628,9 +628,8 @@ where
|
||||
ret
|
||||
});
|
||||
|
||||
let mut html_diff = match html_diff {
|
||||
Cow::Borrowed(_) => return raw_diff,
|
||||
Cow::Owned(s) => s,
|
||||
let Cow::Owned(mut html_diff) = html_diff else {
|
||||
return raw_diff;
|
||||
};
|
||||
|
||||
if inside_font_tag {
|
||||
|
||||
Reference in New Issue
Block a user