refactor: migrate to Rust 2021
Merge branch 'refactor/rust2021' into 'main' See merge request EchidnaHQ/Echidna!16merge-requests/19/merge
commit
f29b48b9b4
|
@ -1,7 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "echidna"
|
name = "echidna"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ impl EchidnaCoreEditor {
|
||||||
|_, _| {},
|
|_, _| {},
|
||||||
|result| {
|
|result| {
|
||||||
if result.is_err() {
|
if result.is_err() {
|
||||||
panic!(result.err());
|
panic!("Found an error when loading the file into the text editor's buffer. {:#?}", result.err());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
@ -114,7 +114,7 @@ impl FileImplementedEditor for super::EchidnaWindow {
|
||||||
"Couldn't get the page of the current index. Try again."
|
"Couldn't get the page of the current index. Try again."
|
||||||
).downcast::<EchidnaCoreEditor>() {
|
).downcast::<EchidnaCoreEditor>() {
|
||||||
Ok(res) => page = res,
|
Ok(res) => page = res,
|
||||||
Err(e) => panic!(format!("We got an error when trying to downcast the current tab page into EchidnaCoreEditor:\n{}", e))
|
Err(e) => panic!("We got an error when trying to downcast the current tab page into EchidnaCoreEditor:\n{}", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
let buffer: Buffer = page.to_imp().sourceview.buffer().downcast().expect("Could not downcast the editor's buffer to GtkSourceBuffer.");
|
let buffer: Buffer = page.to_imp().sourceview.buffer().downcast().expect("Could not downcast the editor's buffer to GtkSourceBuffer.");
|
||||||
|
@ -129,7 +129,7 @@ impl FileImplementedEditor for super::EchidnaWindow {
|
||||||
|_, _| {},
|
|_, _| {},
|
||||||
|result| {
|
|result| {
|
||||||
if result.is_err() {
|
if result.is_err() {
|
||||||
panic!(format!("Found an error while saving the file:\n{}", result.err().expect("No error")))
|
panic!("Found an error while saving the file:\n{}", result.err().expect("No error"))
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue