chore(fmt): apply cargo fmt to recent LSP changes
Pure rustfmt churn — the anchor-match, source-relative resolution, and config-unwrap commits introduced lines that needed rustfmt reformatting. CI's `cargo fmt --check` job was blocking on this. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -377,7 +377,13 @@ impl Config {
|
||||
// Unwrap { "nuwiki": { ... } } → { ... } so both clients work.
|
||||
let inner = value
|
||||
.as_object()
|
||||
.and_then(|m| if m.len() == 1 { m.values().next() } else { None })
|
||||
.and_then(|m| {
|
||||
if m.len() == 1 {
|
||||
m.values().next()
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.filter(|v| v.is_object())
|
||||
.unwrap_or(value);
|
||||
|
||||
|
||||
@@ -210,8 +210,7 @@ pub fn classify_link(
|
||||
}
|
||||
|
||||
fn anchor_resolves_on(page: &crate::index::IndexedPage, anchor: &str) -> bool {
|
||||
page.find_heading_by_anchor(anchor).is_some()
|
||||
|| page.tags.iter().any(|t| t.name == anchor)
|
||||
page.find_heading_by_anchor(anchor).is_some() || page.tags.iter().any(|t| t.name == anchor)
|
||||
}
|
||||
|
||||
/// Same classification as [`classify_link`] but driven from the cached
|
||||
|
||||
@@ -179,14 +179,11 @@ impl WorkspaceIndex {
|
||||
for link in &page.outgoing {
|
||||
if let Some(tgt) = &link.target_page {
|
||||
let key = canonical_link_name(tgt, &name, link.is_absolute, ext);
|
||||
self.backlinks
|
||||
.entry(key)
|
||||
.or_default()
|
||||
.push(Backlink {
|
||||
source_uri: uri.clone(),
|
||||
source_span: link.span,
|
||||
target_anchor: link.anchor.clone(),
|
||||
});
|
||||
self.backlinks.entry(key).or_default().push(Backlink {
|
||||
source_uri: uri.clone(),
|
||||
source_span: link.span,
|
||||
target_anchor: link.anchor.clone(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user