Updates for recent versions of Rust.

* Added lots of dyns
* Removed unused whitespace.
* Removed rust-toolchain because stable rust compiles the project.
* Fixed Doc-tests with ignore keyword.
This commit is contained in:
Sebastian Imlay 2019-10-04 14:52:33 -07:00
parent f15cf258af
commit 5695ec9b94
23 changed files with 170 additions and 171 deletions

View file

@ -31,7 +31,7 @@ impl RSX {
pub fn node<P: Any + 'static>(
tag: &'static str,
styles: StylesList,
create_fn: fn(key: ComponentKey) -> Box<Component>,
create_fn: fn(key: ComponentKey) -> Box<dyn Component>,
props: P,
children: Vec<RSX>
) -> RSX {
@ -43,9 +43,9 @@ impl RSX {
children: children
})
}
/// Shorthand method for creating a new `RSX::VirtualText` instance. Rarely should you call
/// this yourself; the `rsx! {}` and `text!()` macros handle this for you.
/// this yourself; the `rsx! {}` and `text!()` macros handle this for you.
pub fn text(s: String) -> RSX {
RSX::VirtualText(VirtualText(s))
}