Unnamed repository; edit this file 'description' to name the repository.
helix-lsp-types: Prefer `crate::Url` to `url::Url`
This is a cosmetic change to replace all direct `use`s of the `url::Url` type in the `helix-lsp-types` crate with `use crate::Url;`. The types are the same type currently: this refactor will make a future replacement of the Url type less noisy. Connects https://github.com/helix-editor/helix/pull/11889
Michael Davis 2024-12-18
parent cc3b77b · commit 1980bd5
-rw-r--r--helix-lsp-types/src/call_hierarchy.rs3
-rw-r--r--helix-lsp-types/src/document_diagnostic.rs3
-rw-r--r--helix-lsp-types/src/document_link.rs3
-rw-r--r--helix-lsp-types/src/window.rs4
-rw-r--r--helix-lsp-types/src/workspace_diagnostic.rs3
-rw-r--r--helix-lsp-types/src/workspace_folders.rs3
6 files changed, 6 insertions, 13 deletions
diff --git a/helix-lsp-types/src/call_hierarchy.rs b/helix-lsp-types/src/call_hierarchy.rs
index dea78803..2669e08e 100644
--- a/helix-lsp-types/src/call_hierarchy.rs
+++ b/helix-lsp-types/src/call_hierarchy.rs
@@ -1,10 +1,9 @@
use serde::{Deserialize, Serialize};
use serde_json::Value;
-use url::Url;
use crate::{
DynamicRegistrationClientCapabilities, PartialResultParams, Range, SymbolKind, SymbolTag,
- TextDocumentPositionParams, WorkDoneProgressOptions, WorkDoneProgressParams,
+ TextDocumentPositionParams, Url, WorkDoneProgressOptions, WorkDoneProgressParams,
};
pub type CallHierarchyClientCapabilities = DynamicRegistrationClientCapabilities;
diff --git a/helix-lsp-types/src/document_diagnostic.rs b/helix-lsp-types/src/document_diagnostic.rs
index a2b5c41f..5a1c6b35 100644
--- a/helix-lsp-types/src/document_diagnostic.rs
+++ b/helix-lsp-types/src/document_diagnostic.rs
@@ -1,11 +1,10 @@
use std::collections::HashMap;
use serde::{Deserialize, Serialize};
-use url::Url;
use crate::{
Diagnostic, PartialResultParams, StaticRegistrationOptions, TextDocumentIdentifier,
- TextDocumentRegistrationOptions, WorkDoneProgressOptions, WorkDoneProgressParams,
+ TextDocumentRegistrationOptions, Url, WorkDoneProgressOptions, WorkDoneProgressParams,
};
/// Client capabilities specific to diagnostic pull requests.
diff --git a/helix-lsp-types/src/document_link.rs b/helix-lsp-types/src/document_link.rs
index 1400dd96..dde0e201 100644
--- a/helix-lsp-types/src/document_link.rs
+++ b/helix-lsp-types/src/document_link.rs
@@ -1,10 +1,9 @@
use crate::{
- PartialResultParams, Range, TextDocumentIdentifier, WorkDoneProgressOptions,
+ PartialResultParams, Range, TextDocumentIdentifier, Url, WorkDoneProgressOptions,
WorkDoneProgressParams,
};
use serde::{Deserialize, Serialize};
use serde_json::Value;
-use url::Url;
#[derive(Debug, Eq, PartialEq, Clone, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
diff --git a/helix-lsp-types/src/window.rs b/helix-lsp-types/src/window.rs
index ac45e608..0cfffa0c 100644
--- a/helix-lsp-types/src/window.rs
+++ b/helix-lsp-types/src/window.rs
@@ -4,9 +4,7 @@ use serde::{Deserialize, Serialize};
use serde_json::Value;
-use url::Url;
-
-use crate::Range;
+use crate::{Range, Url};
#[derive(Eq, PartialEq, Clone, Copy, Deserialize, Serialize)]
#[serde(transparent)]
diff --git a/helix-lsp-types/src/workspace_diagnostic.rs b/helix-lsp-types/src/workspace_diagnostic.rs
index e8a7646b..485dcc2b 100644
--- a/helix-lsp-types/src/workspace_diagnostic.rs
+++ b/helix-lsp-types/src/workspace_diagnostic.rs
@@ -1,8 +1,7 @@
use serde::{Deserialize, Serialize};
-use url::Url;
use crate::{
- FullDocumentDiagnosticReport, PartialResultParams, UnchangedDocumentDiagnosticReport,
+ FullDocumentDiagnosticReport, PartialResultParams, UnchangedDocumentDiagnosticReport, Url,
WorkDoneProgressParams,
};
diff --git a/helix-lsp-types/src/workspace_folders.rs b/helix-lsp-types/src/workspace_folders.rs
index aeca89ff..2169cade 100644
--- a/helix-lsp-types/src/workspace_folders.rs
+++ b/helix-lsp-types/src/workspace_folders.rs
@@ -1,7 +1,6 @@
use serde::{Deserialize, Serialize};
-use url::Url;
-use crate::OneOf;
+use crate::{OneOf, Url};
#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]