Skip to content

Commit 5e61a6e

Browse files
TatriXMartinKavik
authored andcommitted
docs: Update perform_cmd method example
1 parent 5a7919c commit 5e61a6e

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Changelog
22

33
[unreleased]
4-
- (placeholder)
4+
- [BREAKING] Changed `perform_cmd` and `fetch` return type to `T` instead of `Result<T, T>`.
55

66
## v0.6.0
77
- Implemented `UpdateEl` for `Filter` and `FilterMap`.
@@ -18,7 +18,7 @@
1818
- Fixed processing of multiple event-handlers (#138).
1919
- Added DOM Element references - see `ElRef` and examples (`canvas`, `user_media` or `todomvc`) (#115).
2020
- Removed `Ms: Clone` restriction as much as possible.
21-
- [BREAKING] Added or changed `Custom` variant from `Custom(String)` to `Custom(Cow<'static, str>)`
21+
- [BREAKING] Added or changed `Custom` variant from `Custom(String)` to `Custom(Cow<'static, str>)`
2222
in `Ev`, `Tag`, `At` and `St`. Use function `from` to create custom entities (e.g. `At::from("my-attribute")`) (#208).
2323
- Added macro `nodes!`. It accepts `Node<Msg>` and `Vec<Node<Msg`, returns flattened `Vec<Node<Msg>`.
2424
- Refactored all examples.
@@ -82,7 +82,7 @@ in place of a closure or function to produce the corresponding `Init` and `After
8282
## v0.4.1
8383
- Added more SVG `At` variants
8484
- Added the `St` enum, for style keys; similar to `At`
85-
- Improved ergonomics of `add_child`, `add_attr`, `add_class`,
85+
- Improved ergonomics of `add_child`, `add_attr`, `add_class`,
8686
`add_style`, `replace_text`, and `add_text`, `Node` methods
8787

8888
## v0.4.0
@@ -123,7 +123,7 @@ a text node, but doesn't remove existing ones. Added `add_class`. (Breaking)
123123
- Added support for `request​Animation​Frame`, which improves render performance,
124124
especially for animations
125125
- Styles no longer implicitly add `px`. Added `unit!` macro in its place
126-
- `Map` can now be used directly in elements, without needing to annotate type and collect
126+
- `Map` can now be used directly in elements, without needing to annotate type and collect
127127
(ie for child `Elements`, and `Listener`s)
128128
- Significant changes to MessageMapper
129129
- Orders hs new methods, `clone_app` and `msg_mapper` that allow access to app instance.

src/app/orders.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ pub trait Orders<Ms: 'static, GMs = UndefinedGMsg> {
4747
/// # Example
4848
///
4949
/// ```rust,no_run
50-
///fn write_emoticon_after_delay() -> impl Future<Item=Msg, Error=Msg> {
51-
/// TimeoutFuture::new(2_000)
52-
/// .map(|_| Msg::WriteEmoticon)
53-
/// .map_err(|_| Msg::TimeoutError)
50+
///async fn write_emoticon_after_delay() -> Msg {
51+
/// TimeoutFuture::new(2_000).await;
52+
/// Msg::WriteEmoticon
5453
///}
5554
///orders.perform_cmd(write_emoticon_after_delay());
5655
/// ```

0 commit comments

Comments
 (0)