refactor: use match when processing EchidnaCoreEditor's initial file

Just like in 8e31be7.
merge-requests/23/head
Nefo Fortressia 2021-12-18 17:29:39 +07:00
parent 8e31be7e47
commit 9b99932fdd
Signed by: fortressia
GPG Key ID: 6D7972CC76174995
1 changed files with 37 additions and 35 deletions

View File

@ -21,8 +21,8 @@ impl EchidnaCoreEditor {
// Without cloning it, for some reasons the Rust compiler complains about &this.to_imp().sourceview not being IsA<sourceview::View>
this_imp.minimap.set_view(&this_imp.sourceview.clone());
if file.is_some() {
let file = file.unwrap();
match file {
Some(file) => {
let file_location = file
.location()
.expect("file is required to have a location");
@ -73,6 +73,8 @@ impl EchidnaCoreEditor {
);
}
}
None => {}
}
this
}