diff options
Diffstat (limited to 'crates/vfs-notify/src')
-rw-r--r-- | crates/vfs-notify/src/lib.rs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/crates/vfs-notify/src/lib.rs b/crates/vfs-notify/src/lib.rs index 68fdb8cb0..25ba8d798 100644 --- a/crates/vfs-notify/src/lib.rs +++ b/crates/vfs-notify/src/lib.rs | |||
@@ -82,7 +82,12 @@ impl NotifyActor { | |||
82 | watcher_receiver, | 82 | watcher_receiver, |
83 | } | 83 | } |
84 | } | 84 | } |
85 | 85 | fn next_event(&self, receiver: &Receiver<Message>) -> Option<Event> { | |
86 | select! { | ||
87 | recv(receiver) -> it => it.ok().map(Event::Message), | ||
88 | recv(&self.watcher_receiver) -> it => Some(Event::NotifyEvent(it.unwrap())), | ||
89 | } | ||
90 | } | ||
86 | fn run(mut self, inbox: Receiver<Message>) { | 91 | fn run(mut self, inbox: Receiver<Message>) { |
87 | while let Some(event) = self.next_event(&inbox) { | 92 | while let Some(event) = self.next_event(&inbox) { |
88 | log::debug!("vfs-notify event: {:?}", event); | 93 | log::debug!("vfs-notify event: {:?}", event); |
@@ -154,12 +159,6 @@ impl NotifyActor { | |||
154 | } | 159 | } |
155 | } | 160 | } |
156 | } | 161 | } |
157 | fn next_event(&self, receiver: &Receiver<Message>) -> Option<Event> { | ||
158 | select! { | ||
159 | recv(receiver) -> it => it.ok().map(Event::Message), | ||
160 | recv(&self.watcher_receiver) -> it => Some(Event::NotifyEvent(it.unwrap())), | ||
161 | } | ||
162 | } | ||
163 | fn load_entry( | 162 | fn load_entry( |
164 | &mut self, | 163 | &mut self, |
165 | entry: loader::Entry, | 164 | entry: loader::Entry, |