Reduce visibility
This commit is contained in:
parent
b6740060f6
commit
42c766b2bd
1 changed files with 9 additions and 6 deletions
|
@ -54,14 +54,17 @@ pub(crate) fn runnable_args(
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub struct CargoTargetSpec {
|
pub(crate) struct CargoTargetSpec {
|
||||||
pub package: String,
|
pub(crate) package: String,
|
||||||
pub target: String,
|
pub(crate) target: String,
|
||||||
pub target_kind: TargetKind,
|
pub(crate) target_kind: TargetKind,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl CargoTargetSpec {
|
impl CargoTargetSpec {
|
||||||
pub fn for_file(world: &WorldSnapshot, file_id: FileId) -> Result<Option<CargoTargetSpec>> {
|
pub(crate) fn for_file(
|
||||||
|
world: &WorldSnapshot,
|
||||||
|
file_id: FileId,
|
||||||
|
) -> Result<Option<CargoTargetSpec>> {
|
||||||
let &crate_id = match world.analysis().crate_for(file_id)?.first() {
|
let &crate_id = match world.analysis().crate_for(file_id)?.first() {
|
||||||
Some(crate_id) => crate_id,
|
Some(crate_id) => crate_id,
|
||||||
None => return Ok(None),
|
None => return Ok(None),
|
||||||
|
@ -82,7 +85,7 @@ impl CargoTargetSpec {
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn push_to(self, buf: &mut Vec<String>) {
|
pub(crate) fn push_to(self, buf: &mut Vec<String>) {
|
||||||
buf.push("--package".to_string());
|
buf.push("--package".to_string());
|
||||||
buf.push(self.package);
|
buf.push(self.package);
|
||||||
match self.target_kind {
|
match self.target_kind {
|
||||||
|
|
Loading…
Reference in a new issue