Replaced if-let-else-unreachable with let-else-unreachable
This commit is contained in:
parent
58d02c86e2
commit
605b29ddfb
16
src/main.rs
16
src/main.rs
@ -566,7 +566,10 @@ fn handle_relative_connection(
|
||||
);
|
||||
};
|
||||
|
||||
if let Ok(pk_file) = File::open(file_paths.pk) {
|
||||
let Ok(pk_file) = File::open(file_paths.pk) else {
|
||||
unreachable!();
|
||||
};
|
||||
|
||||
let lines = BufReader::new(pk_file).lines();
|
||||
|
||||
if let Some(i) = partial {
|
||||
@ -652,14 +655,14 @@ fn handle_relative_connection(
|
||||
.with_use_textboxes(true),
|
||||
);
|
||||
}
|
||||
} else {
|
||||
unreachable!();
|
||||
}
|
||||
|
||||
section(&mut stream);
|
||||
|
||||
if let Some(pki_path) = file_paths.pki {
|
||||
if let Ok(pki_file) = File::open(pki_path) {
|
||||
let Ok(pki_file) = File::open(pki_path) else {
|
||||
unreachable!();
|
||||
};
|
||||
|
||||
let _ = writeln!(stream, "<h1>Description</h1>");
|
||||
|
||||
if let Some(audio_path) = &file_paths.audio {
|
||||
@ -675,9 +678,6 @@ fn handle_relative_connection(
|
||||
convert_subheader(lines.map(Result::unwrap_or_default), &mut stream, 1);
|
||||
|
||||
section(&mut stream);
|
||||
} else {
|
||||
unreachable!();
|
||||
}
|
||||
}
|
||||
|
||||
let html = html! {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user