refactor: use match when processing EchidnaCoreEditor's initial file
Just like in 8e31be7
.
merge-requests/23/head
parent
8e31be7e47
commit
9b99932fdd
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue