mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-10 20:29:05 +00:00
Properly ignore missing/empty runnables config
This commit is contained in:
parent
48a6fb9e84
commit
c54d6aff6c
1 changed files with 13 additions and 10 deletions
|
@ -79,8 +79,10 @@ impl<T: for<'a> Deserialize<'a> + PartialEq + 'static> TrackedFile<T> {
|
|||
) -> Model<Self> {
|
||||
cx.new_model(move |cx| {
|
||||
cx.spawn(|tracked_file, mut cx| async move {
|
||||
while let Some(new_contents) = tracker.next().await.filter(|s| !s.is_empty()) {
|
||||
let Some(new_contents) = serde_json_lenient::from_str(&new_contents).log_err()
|
||||
while let Some(new_contents) = tracker.next().await {
|
||||
if !new_contents.trim().is_empty() {
|
||||
let Some(new_contents) =
|
||||
serde_json_lenient::from_str(&new_contents).log_err()
|
||||
else {
|
||||
continue;
|
||||
};
|
||||
|
@ -91,6 +93,7 @@ impl<T: for<'a> Deserialize<'a> + PartialEq + 'static> TrackedFile<T> {
|
|||
};
|
||||
})?;
|
||||
}
|
||||
}
|
||||
anyhow::Ok(())
|
||||
})
|
||||
.detach_and_log_err(cx);
|
||||
|
|
Loading…
Reference in a new issue