mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
reduce panics
This commit is contained in:
parent
db97e3ed22
commit
712d648cf0
2 changed files with 19 additions and 8 deletions
|
@ -74,7 +74,8 @@ impl Registry {
|
|||
if &document.doc_info.url == updating_url {
|
||||
//Write the newly analysed document into the oncelock that any request requiring the latest document will be waiting on
|
||||
if let Some(a) = documents.get_mut(updating_url) {
|
||||
a.latest_document.set(document.clone()).unwrap()
|
||||
//We don't care if this fails becasue we expect the document to sometimes alreday be there
|
||||
a.latest_document.set(document.clone()).unwrap_or(())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue