Clippy appeasement.

This commit is contained in:
Bodil Stokke 2019-06-28 14:45:44 +01:00
parent 15c6ca1143
commit d97c8fa03c
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ pub fn start(vdom: VdomWeak) {
// Note that if we ever intended to unmount our todos app, we would want to
// provide a method for removing this router's event listener and cleaning
// up after ourselves.
let on_hash_change = Closure::wrap(Box::new(on_hash_change) as Box<FnMut()>);
let on_hash_change = Closure::wrap(Box::new(on_hash_change) as Box<dyn FnMut()>);
let window = utils::window();
window
.add_event_listener_with_callback("hashchange", on_hash_change.as_ref().unchecked_ref())

View File

@ -3,8 +3,8 @@
use std::fmt::Display;
use std::marker::PhantomData;
use crate::OutputType;
use crate::elements::{FlowContent, PhrasingContent};
use crate::OutputType;
use htmlescape::encode_minimal;
/// A boxed DOM tree, as returned from the `html!` macro.
@ -23,7 +23,7 @@ use htmlescape::encode_minimal;
/// let rendered_tree: String = tree.to_string();
/// # }
/// ```
pub type DOMTree<T> = Box<Node<T>>;
pub type DOMTree<T> = Box<dyn Node<T>>;
/// An untyped representation of an HTML node.
///