Skip to content

Commit dca8a6e

Browse files
committed
fix(tui): gate diagnostic test imports
Move the `Position` and `Range` imports in `editor.rs` behind `cfg(test)`. They are only used by the diagnostic snapshot unit test, while the runtime code uses `Diagnostic` through the existing editor snapshot path.
1 parent 2aa5304 commit dca8a6e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/editor.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ use unicode_segmentation::UnicodeSegmentation;
4343

4444
pub use render_buffer::RenderBuffer;
4545

46+
#[cfg(test)]
47+
use crate::lsp::{Position, Range};
4648
use crate::{
4749
buffer::Buffer,
4850
color::Color,
@@ -53,8 +55,8 @@ use crate::{
5355
log,
5456
lsp::{
5557
get_client_capabilities, CompletionResponse, Diagnostic, DiagnosticSeverity,
56-
InboundMessage, LspClient, ParsedNotification, Position, ProgressParams, ProgressToken,
57-
Range, ResponseMessage, ServerCapabilities,
58+
InboundMessage, LspClient, ParsedNotification, ProgressParams, ProgressToken,
59+
ResponseMessage, ServerCapabilities,
5860
},
5961
plugin::{self, PluginRegistry, Runtime},
6062
theme::{Style, Theme},

0 commit comments

Comments
 (0)