Skip to content

Commit

Permalink
refactor: Rename CargoRunnable to CargoRunnableArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Wilfred committed Mar 27, 2024
1 parent 3746eb2 commit 5cd677c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions crates/rust-analyzer/src/handlers/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ pub(crate) fn handle_runnables(
),
location: None,
kind: lsp_ext::RunnableKind::Cargo,
args: lsp_ext::CargoRunnable {
args: lsp_ext::CargoRunnableArgs {
workspace_root: Some(spec.workspace_root.clone().into()),
override_cargo: config.override_cargo.clone(),
cargo_args,
Expand All @@ -868,7 +868,7 @@ pub(crate) fn handle_runnables(
label: "cargo check --workspace".to_owned(),
location: None,
kind: lsp_ext::RunnableKind::Cargo,
args: lsp_ext::CargoRunnable {
args: lsp_ext::CargoRunnableArgs {
workspace_root: None,
override_cargo: config.override_cargo,
cargo_args: vec!["check".to_owned(), "--workspace".to_owned()],
Expand Down
4 changes: 2 additions & 2 deletions crates/rust-analyzer/src/lsp/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ pub struct Runnable {
#[serde(skip_serializing_if = "Option::is_none")]
pub location: Option<lsp_types::LocationLink>,
pub kind: RunnableKind,
pub args: CargoRunnable,
pub args: CargoRunnableArgs,
}

#[derive(Serialize, Deserialize, Debug)]
Expand All @@ -434,7 +434,7 @@ pub enum RunnableKind {

#[derive(Deserialize, Serialize, Debug)]
#[serde(rename_all = "camelCase")]
pub struct CargoRunnable {
pub struct CargoRunnableArgs {
// command to be executed instead of cargo
pub override_cargo: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
Expand Down
4 changes: 2 additions & 2 deletions crates/rust-analyzer/src/lsp/to_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,7 @@ pub(crate) fn runnable(
label,
location: Some(location),
kind: lsp_ext::RunnableKind::Cargo,
args: lsp_ext::CargoRunnable {
args: lsp_ext::CargoRunnableArgs {
workspace_root: Some(workspace_root.into()),
override_cargo: config.override_cargo,
cargo_args,
Expand All @@ -1384,7 +1384,7 @@ pub(crate) fn runnable(
label,
location: Some(location),
kind: lsp_ext::RunnableKind::Cargo,
args: lsp_ext::CargoRunnable {
args: lsp_ext::CargoRunnableArgs {
workspace_root: None,
override_cargo: config.override_cargo,
cargo_args,
Expand Down

0 comments on commit 5cd677c

Please sign in to comment.