chore: apply formatting
This commit is contained in:
@@ -466,7 +466,8 @@ fn definition_jumps_from_a_data_key_to_the_schema() {
|
||||
}
|
||||
}),
|
||||
));
|
||||
// The file schema auto-loads because it sits in the document's directory. Satisfy it.
|
||||
// The file schema auto-loads because it sits in the document's directory.
|
||||
// Satisfy it.
|
||||
let fetch = rx.try_recv().expect("a schema fetch was requested");
|
||||
server.handle_fetch(FetchResult::Ok {
|
||||
url: fetch.url,
|
||||
|
||||
+5
-4
@@ -70,8 +70,8 @@ pub struct SchemaStore {
|
||||
workspace_roots: Vec<PathBuf>,
|
||||
/// Where remote schemas are cached on disk, so a loaded schema's source
|
||||
/// can be re-read for features that need its text (go-to-definition).
|
||||
/// `None` disables that recovery for remote schemas, while local ones still
|
||||
/// resolve to their own file.
|
||||
/// `None` disables that recovery for remote schemas, while local ones
|
||||
/// still resolve to their own file.
|
||||
cache_dir: Option<PathBuf>,
|
||||
policy: FetchPolicy,
|
||||
fetch_tx: Sender<FetchRequest>,
|
||||
@@ -261,8 +261,9 @@ impl SchemaStore {
|
||||
fn enqueue(&mut self, url: String, doc_uri: String, allow_network: bool) {
|
||||
self.waiting.entry(url.clone()).or_default().insert(doc_uri);
|
||||
if self.pending.contains(&url) {
|
||||
// A load is already in flight, so remember a download request and it
|
||||
// can escalate once an in-flight cache-only probe misses.
|
||||
// A load is already in flight, so remember a download request and
|
||||
// it can escalate once an in-flight cache-only probe
|
||||
// misses.
|
||||
if allow_network {
|
||||
self.want_network.insert(url);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user