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>
|
// 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());
|
this_imp.minimap.set_view(&this_imp.sourceview.clone());
|
||||||
|
|
||||||
if file.is_some() {
|
match file {
|
||||||
let file = file.unwrap();
|
Some(file) => {
|
||||||
let file_location = file
|
let file_location = file
|
||||||
.location()
|
.location()
|
||||||
.expect("file is required to have a location");
|
.expect("file is required to have a location");
|
||||||
|
@ -73,6 +73,8 @@ impl EchidnaCoreEditor {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
None => {}
|
||||||
|
}
|
||||||
this
|
this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue