Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
hotfix(panic): `harper_ls` will no longer panic when opened with in-memory buffer
Elijah Potterc264c07bf0d2
diff --git a/harper-ls/src/backend.rs b/harper-ls/src/backend.rsindex 872f6e5c7..abdcce491 100644--- a/harper-ls/src/backend.rs+++ b/harper-ls/src/backend.rs@@ -32,7 +32,10 @@ pub struct Backend {impl Backend {async fn update_document_from_file(&self, url: &Url) {- let content = tokio::fs::read_to_string(url.path()).await.unwrap();+ let Ok(content) = tokio::fs::read_to_string(url.path()).await else {+ // TODO: Proper error handling here.+ return;+ };self.update_document(url, &content).await;}