mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-06 02:10:37 +00:00
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:
parent
89e979ba3f
commit
f6e7f9084e
1 changed files with 4 additions and 4 deletions
|
@ -27,14 +27,14 @@
|
|||
//!
|
||||
//! ## StorageHandle Pattern (for tower-lsp)
|
||||
//! - 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
|
||||
//!
|
||||
//! ## Why Files are in Database, Overlays in Session
|
||||
//! - Files need persistent tracking across all queries (thus in Database)
|
||||
//! - Overlays are LSP-specific and change frequently (thus in Session)
|
||||
//! - 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
|
||||
//!
|
||||
|
@ -49,7 +49,7 @@
|
|||
//! This design achieves:
|
||||
//! - Fast overlay updates (no Salsa invalidation)
|
||||
//! - 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)
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
@ -168,7 +168,7 @@ impl Database {
|
|||
/// Get or create a SourceFile for the given path.
|
||||
///
|
||||
/// 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.
|
||||
pub fn get_or_create_file(&mut self, path: PathBuf) -> SourceFile {
|
||||
if let Some(file_ref) = self.files.get(&path) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue