Fix warnings introduced in newer Rust Nightly

This does not (yet) upgrade ./rust-toolchain

The warnings:

* dead_code "field is never read"
* redundant_semicolons "unnecessary trailing semicolon"
* non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021"
* unstable_name_collisions "a method with this name may be added to the standard library in the future"
* legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
This commit is contained in:
Simon Sapin 2021-02-25 10:39:53 +01:00
parent 4353d534d4
commit a0d9f97c8e
35 changed files with 75 additions and 116 deletions

View file

@ -174,7 +174,7 @@ pub struct ServoGlue {
// and exit if it is empty afterwards.
browsers: Vec<BrowserId>,
events: Vec<WindowEvent>,
current_url: Option<ServoUrl>,
context_menu_sender: Option<IpcSender<ContextMenuResult>>,
}
@ -306,7 +306,6 @@ pub fn init(
browser_id: None,
browsers: vec![],
events: vec![],
current_url: Some(url.clone()),
context_menu_sender: None,
};
let browser_id = BrowserId::new();
@ -636,7 +635,6 @@ impl ServoGlue {
self.callbacks
.host_callbacks
.on_url_changed(entries[current].clone().to_string());
self.current_url = Some(entries[current].clone());
},
EmbedderMsg::LoadStart => {
self.callbacks.host_callbacks.on_load_started();