From aeb503200b8e22bcf87656a1b7f5c5a857faad89 Mon Sep 17 00:00:00 2001 From: wiiznokes <78230769+wiiznokes@users.noreply.github.com> Date: Sat, 29 Jul 2023 23:24:33 +0200 Subject: [PATCH] Update README.md --- examples/proxy/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/proxy/README.md b/examples/proxy/README.md index 3a26461bb0..7c1344215d 100644 --- a/examples/proxy/README.md +++ b/examples/proxy/README.md @@ -1,7 +1,7 @@ this example show how having Proxy could be useful. -the important code part in here: +the important code part are in here: ``` let mut watcher = RecommendedWatcher::new( @@ -14,13 +14,13 @@ let mut watcher = RecommendedWatcher::new( ``` -notify::RecommendedWatcher have his own runtime to watch event on fs. +`notify::RecommendedWatcher` have his own runtime to watch event on fs. Currently, the only way to use it in Iced is by using subscription. This is not easy to use and can even lead to issues. imagine you want to see what files are in a dir, and also be notified when fs events occurs in it. -# with Subscription +### with Subscription ``` sender.send(Action::Watch(path)) // sender is send by using subscription::channel @@ -30,7 +30,7 @@ sender.send(Action::Watch(path)) // sender is send by using subscription::channe fetch_dir(path) ``` -# with proxy +### with proxy ``` // we can have the watcher inside our struct watcher.watch(path)