From 42c766b2bdb88afbde051db064f255aa71c75fbd Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Feb 2020 12:16:40 +0100 Subject: [PATCH] Reduce visibility --- crates/ra_lsp_server/src/cargo_target_spec.rs | 15 +++++++++------ 1 file 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 56d3f0de453..e08cc30e2e3 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( Ok(res) } -pub struct CargoTargetSpec { - pub package: String, - pub target: String, - pub target_kind: TargetKind, +pub(crate) struct CargoTargetSpec { + pub(crate) package: String, + pub(crate) target: String, + pub(crate) target_kind: TargetKind, } impl CargoTargetSpec { - pub fn for_file(world: &WorldSnapshot, file_id: FileId) -> Result> { + pub(crate) fn for_file( + world: &WorldSnapshot, + file_id: FileId, + ) -> Result> { let &crate_id = match world.analysis().crate_for(file_id)?.first() { Some(crate_id) => crate_id, None => return Ok(None), @@ -82,7 +85,7 @@ impl CargoTargetSpec { Ok(res) } - pub fn push_to(self, buf: &mut Vec) { + pub(crate) fn push_to(self, buf: &mut Vec) { buf.push("--package".to_string()); buf.push(self.package); match self.target_kind {