Skip to content

Commit

Permalink
helix-lsp-types: Prefer crate::Url to url::Url
Browse files Browse the repository at this point in the history
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 helix-editor#11889
  • Loading branch information
the-mikedavis committed Dec 17, 2024
1 parent cc3b77b commit 1980bd5
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 13 deletions.
3 changes: 1 addition & 2 deletions helix-lsp-types/src/call_hierarchy.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 1 addition & 2 deletions helix-lsp-types/src/document_diagnostic.rs
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
3 changes: 1 addition & 2 deletions helix-lsp-types/src/document_link.rs
Original file line number Diff line number Diff line change
@@ -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")]
Expand Down
4 changes: 1 addition & 3 deletions helix-lsp-types/src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
3 changes: 1 addition & 2 deletions helix-lsp-types/src/workspace_diagnostic.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use serde::{Deserialize, Serialize};
use url::Url;

use crate::{
FullDocumentDiagnosticReport, PartialResultParams, UnchangedDocumentDiagnosticReport,
FullDocumentDiagnosticReport, PartialResultParams, UnchangedDocumentDiagnosticReport, Url,
WorkDoneProgressParams,
};

Expand Down
3 changes: 1 addition & 2 deletions helix-lsp-types/src/workspace_folders.rs
Original file line number Diff line number Diff line change
@@ -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")]
Expand Down

0 comments on commit 1980bd5

Please sign in to comment.