summaryrefslogtreecommitdiffstats
path: root/native/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-05 06:01:54 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-08-05 06:01:54 +0200
commitad5bd0970d7106a97d455a164a582ab1d0bff18b (patch)
treebb8d6f00fe25de9187b1d3b90a88ae95225b7428 /native/src
parentd5629c103cc6cb907b37937a591636beb003d24b (diff)
downloadiced-ad5bd0970d7106a97d455a164a582ab1d0bff18b.tar.gz
iced-ad5bd0970d7106a97d455a164a582ab1d0bff18b.tar.bz2
iced-ad5bd0970d7106a97d455a164a582ab1d0bff18b.zip
Fix documentation in `operation::focusable`
Diffstat (limited to 'native/src')
-rw-r--r--native/src/widget/operation/focusable.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/native/src/widget/operation/focusable.rs b/native/src/widget/operation/focusable.rs
index d20bfef9..f17bf178 100644
--- a/native/src/widget/operation/focusable.rs
+++ b/native/src/widget/operation/focusable.rs
@@ -54,7 +54,8 @@ pub fn focus<T>(target: Id) -> impl Operation<T> {
Focus { target }
}
-/// Produces an [`Operation`] that generates a [`Count`].
+/// Produces an [`Operation`] that generates a [`Count`] and chains it with the
+/// provided function to build a new [`Operation`].
pub fn count<T, O>(f: fn(Count) -> O) -> impl Operation<T>
where
O: Operation<T> + 'static,
@@ -95,7 +96,7 @@ where
}
}
-/// Produces an [`Operation`] that searches for the current focuses widget, and
+/// Produces an [`Operation`] that searches for the current focused widget, and
/// - if found, focuses the previous focusable widget.
/// - if not found, focuses the last focusable widget.
pub fn focus_previous<T>() -> impl Operation<T> {
@@ -134,7 +135,7 @@ pub fn focus_previous<T>() -> impl Operation<T> {
count(|count| FocusPrevious { count, current: 0 })
}
-/// Produces an [`Operation`] that searches for the current focuses widget, and
+/// Produces an [`Operation`] that searches for the current focused widget, and
/// - if found, focuses the next focusable widget.
/// - if not found, focuses the first focusable widget.
pub fn focus_next<T>() -> impl Operation<T> {