Fix missing backticks in documentation

Fixed unclosed HTML tag warnings by adding backticks around:
- Generic types like Arc<DashMap>
- Type names in documentation like StorageHandle<Database>
- The word 'Arc' when referring to the type
This commit is contained in:
Josh Thomas 2025-08-29 16:02:39 -05:00
parent 89e979ba3f
commit f6e7f9084e

View file

@ -27,14 +27,14 @@
//! //!
//! ## StorageHandle Pattern (for tower-lsp) //! ## StorageHandle Pattern (for tower-lsp)
//! - Database itself is NOT Send+Sync (due to RefCell in Salsa's Storage) //! - Database itself is NOT Send+Sync (due to RefCell in Salsa's Storage)
//! - StorageHandle<Database> IS Send+Sync, enabling use across threads //! - `StorageHandle<Database>` IS Send+Sync, enabling use across threads
//! - Session stores StorageHandle, creates Database instances on-demand //! - Session stores StorageHandle, creates Database instances on-demand
//! //!
//! ## Why Files are in Database, Overlays in Session //! ## Why Files are in Database, Overlays in Session
//! - Files need persistent tracking across all queries (thus in Database) //! - Files need persistent tracking across all queries (thus in Database)
//! - Overlays are LSP-specific and change frequently (thus in Session) //! - Overlays are LSP-specific and change frequently (thus in Session)
//! - This separation prevents Salsa invalidation cascades on every keystroke //! - This separation prevents Salsa invalidation cascades on every keystroke
//! - Both are accessed via Arc<DashMap> for thread safety and cheap cloning //! - Both are accessed via `Arc<DashMap>` for thread safety and cheap cloning
//! //!
//! # Data Flow //! # Data Flow
//! //!
@ -49,7 +49,7 @@
//! This design achieves: //! This design achieves:
//! - Fast overlay updates (no Salsa invalidation) //! - Fast overlay updates (no Salsa invalidation)
//! - Proper incremental computation (via revision tracking) //! - Proper incremental computation (via revision tracking)
//! - Thread safety (via Arc<DashMap> and StorageHandle) //! - Thread safety (via `Arc<DashMap>` and StorageHandle)
//! - Clean separation of concerns (LSP vs computation) //! - Clean separation of concerns (LSP vs computation)
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
@ -168,7 +168,7 @@ impl Database {
/// Get or create a SourceFile for the given path. /// Get or create a SourceFile for the given path.
/// ///
/// This method implements Ruff's pattern for lazy file creation. Files are created /// This method implements Ruff's pattern for lazy file creation. Files are created
/// with an initial revision of 0 and tracked in the Database's DashMap. The Arc /// with an initial revision of 0 and tracked in the Database's `DashMap`. The `Arc`
/// ensures cheap cloning while maintaining thread safety. /// ensures cheap cloning while maintaining thread safety.
pub fn get_or_create_file(&mut self, path: PathBuf) -> SourceFile { pub fn get_or_create_file(&mut self, path: PathBuf) -> SourceFile {
if let Some(file_ref) = self.files.get(&path) { if let Some(file_ref) = self.files.get(&path) {