diff options
author | Aleksey Kladov <[email protected]> | 2020-02-18 11:16:40 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-02-18 11:16:40 +0000 |
commit | 42c766b2bdb88afbde051db064f255aa71c75fbd (patch) | |
tree | a9ab833a3b7cbe8918447f9bcd1d3d4320ecc044 /crates/ra_lsp_server/src/cargo_target_spec.rs | |
parent | b6740060f60fa016ac1c3d420c9ac919d31f6997 (diff) |
Reduce visibility
Diffstat (limited to 'crates/ra_lsp_server/src/cargo_target_spec.rs')
-rw-r--r-- | crates/ra_lsp_server/src/cargo_target_spec.rs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs index 56d3f0de4..e08cc30e2 100644 --- a/crates/ra_lsp_server/src/cargo_target_spec.rs +++ b/crates/ra_lsp_server/src/cargo_target_spec.rs | |||
@@ -54,14 +54,17 @@ pub(crate) fn runnable_args( | |||
54 | Ok(res) | 54 | Ok(res) |
55 | } | 55 | } |
56 | 56 | ||
57 | pub struct CargoTargetSpec { | 57 | pub(crate) struct CargoTargetSpec { |
58 | pub package: String, | 58 | pub(crate) package: String, |
59 | pub target: String, | 59 | pub(crate) target: String, |
60 | pub target_kind: TargetKind, | 60 | pub(crate) target_kind: TargetKind, |
61 | } | 61 | } |
62 | 62 | ||
63 | impl CargoTargetSpec { | 63 | impl CargoTargetSpec { |
64 | pub fn for_file(world: &WorldSnapshot, file_id: FileId) -> Result<Option<CargoTargetSpec>> { | 64 | pub(crate) fn for_file( |
65 | world: &WorldSnapshot, | ||
66 | file_id: FileId, | ||
67 | ) -> Result<Option<CargoTargetSpec>> { | ||
65 | let &crate_id = match world.analysis().crate_for(file_id)?.first() { | 68 | let &crate_id = match world.analysis().crate_for(file_id)?.first() { |
66 | Some(crate_id) => crate_id, | 69 | Some(crate_id) => crate_id, |
67 | None => return Ok(None), | 70 | None => return Ok(None), |
@@ -82,7 +85,7 @@ impl CargoTargetSpec { | |||
82 | Ok(res) | 85 | Ok(res) |
83 | } | 86 | } |
84 | 87 | ||
85 | pub fn push_to(self, buf: &mut Vec<String>) { | 88 | pub(crate) fn push_to(self, buf: &mut Vec<String>) { |
86 | buf.push("--package".to_string()); | 89 | buf.push("--package".to_string()); |
87 | buf.push(self.package); | 90 | buf.push(self.package); |
88 | match self.target_kind { | 91 | match self.target_kind { |