on master help sign in
Ignore SendErrors when handling grammars (#2641)
f7c27b6Frojdholm
helix-loader/src/grammar.rs+3−1
@@ -133,7 +133,9 @@ where
133 let tx = tx.clone();
133 let tx = tx.clone();
134
134
135 pool.execute(move || {
135 pool.execute(move || {
136+ // Ignore any SendErrors, if any job in another thread has encountered an
137+ // error the Receiver will be closed causing this send to fail.
136− tx.send(job(grammar)).unwrap();
138+ let _ = tx.send(job(grammar));
137 });
139 });
138 }
140 }
139
141