Skip to content

Commit 0cd9628

Browse files
committed
Reformat
1 parent 38459e9 commit 0cd9628

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

crates/oak_db/src/definition.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,13 @@ impl<'db> File {
135135
}
136136

137137
/// Every `Definition` in a file, keyed by its definition site.
138-
///
139-
/// A `salsa::Update` struct rather than a bare map so the salsa-tracked
140-
/// `File::definitions` query can store it: salsa needs the `Update` impl to
141-
/// handle the `Definition<'db>` lifetime that the map values carry.
142138
#[derive(Debug, PartialEq, Eq, salsa::Update)]
143139
struct FileDefinitions<'db> {
144140
by_site: FxHashMap<DefinitionSite, Definition<'db>>,
145141
}
146142

147143
/// Map key for [`FileDefinitions`]: a binding's `(scope, def_id)` site.
148144
///
149-
/// A named struct rather than a `(ScopeId, DefinitionId)` tuple so it can
150-
/// derive `salsa::Update` (the salsa map key must implement it). The derive
151-
/// falls back to a plain replace for the `'static` index fields, which don't
152-
/// implement `Update` themselves (`oak_semantic` has no salsa dependency).
153145
/// Mirrors ty's `DefinitionNodeKey`.
154146
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, salsa::Update)]
155147
struct DefinitionSite {

crates/oak_db/src/tests/file_resolve.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,10 @@ fn test_same_name_sibling_insertion_churns_later_definition_id() {
388388
let file = files[0];
389389

390390
// `resolve` is last-wins, so it returns the final `x` (`x <- 2`), ordinal 1.
391-
let id1 = file.resolve(&db, name(&db, "x")).expect("x resolves").as_id();
391+
let id1 = file
392+
.resolve(&db, name(&db, "x"))
393+
.expect("x resolves")
394+
.as_id();
392395

393396
// Insert another `x` at the top. The final `x` is still last-wins, but its
394397
// ordinal among same-name siblings shifts from 1 to 2.

0 commit comments

Comments
 (0)