forked from lavender-legacy/lavender.software
		
	Simplify watch loop
This commit is contained in:
		
							parent
							
								
									89f26b9a0e
								
							
						
					
					
						commit
						26b30cd030
					
				
					 1 changed files with 2 additions and 5 deletions
				
			
		|  | @ -74,11 +74,8 @@ fn main() { | ||||||
|         let mut watcher = watcher(tx, Duration::from_millis(100)).unwrap(); |         let mut watcher = watcher(tx, Duration::from_millis(100)).unwrap(); | ||||||
|         watcher.watch("./src", RecursiveMode::Recursive).unwrap(); |         watcher.watch("./src", RecursiveMode::Recursive).unwrap(); | ||||||
| 
 | 
 | ||||||
|         loop { |         while rx.recv().is_ok() { | ||||||
|             match rx.recv() { |             build() | ||||||
|                 Ok(_) => build(), |  | ||||||
|                 Err(_) => break, |  | ||||||
|             } |  | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue