From 499706384a08d821cd3f3dd1e12af01e8ecdb3c2 Mon Sep 17 00:00:00 2001 From: Jonas Aasberg Date: Thu, 17 Sep 2026 19:13:07 +0200 Subject: [PATCH] docs(log-cache): put insert's summary line back on insert has_walk was inserted between insert's doc comment and insert in #479, so the comment was swallowed: has_walk's rustdoc SUMMARY LINE -- the one line shown in generated docs, an IDE hover and a symbol list -- read "File a freshly prepared walk, evicting the least recently used one", which describes insert and is the opposite of what has_walk does (it counts no hit and moves nothing). insert, the function that actually evicts, was left undocumented. One line moved, nothing else. **Why it got through:** it compiles, every test passes, and no content was lost -- both sentences were present, attached to the wrong functions. The only tell is reading the file. It came from anchoring an insertion on `pub fn insert` when the doc comment for that function sits ABOVE the line anchored on; an insert anchored on a signature lands inside the preceding item's documentation. Refs #473 Co-Authored-By: Claude Opus 5 (1M context) --- src-tauri/src/git/log_cache.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src-tauri/src/git/log_cache.rs b/src-tauri/src/git/log_cache.rs index 634731c..900fef4 100644 --- a/src-tauri/src/git/log_cache.rs +++ b/src-tauri/src/git/log_cache.rs @@ -246,7 +246,6 @@ impl LogCache { Some(out) } - /// File a freshly prepared walk, evicting the least recently used one. /// Whether a walk for `key` is already filed, whatever it can answer. /// /// Not the same question as `first_page`, and the difference is the point. @@ -270,6 +269,7 @@ impl LogCache { .unwrap_or(false) } + /// File a freshly prepared walk, evicting the least recently used one. pub fn insert(&self, repo: &RepoId, key: WalkKey, order: Arc) { let Ok(mut repos) = self.repos.lock() else { return;