aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/install.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-03-01 17:51:35 +0000
committerGitHub <[email protected]>2021-03-01 17:51:35 +0000
commit5efb7f85eb24c7ad76136a7d81e8f8cffe213aa8 (patch)
tree0795d7277733920361a260db1a65306f1a47e1ac /xtask/src/install.rs
parentc17f2bf2a27798858ef2e3012ca28295aed46efa (diff)
parentd9dcfd81c5d4325379ac88c4250b9c77ecbd75e8 (diff)
Merge #7830
7830: Simplify xtask r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'xtask/src/install.rs')
-rw-r--r--xtask/src/install.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs
index 4c5c2673c..ea2194248 100644
--- a/xtask/src/install.rs
+++ b/xtask/src/install.rs
@@ -8,13 +8,13 @@ use xshell::{cmd, pushd};
8// Latest stable, feel free to send a PR if this lags behind. 8// Latest stable, feel free to send a PR if this lags behind.
9const REQUIRED_RUST_VERSION: u32 = 50; 9const REQUIRED_RUST_VERSION: u32 = 50;
10 10
11pub struct InstallCmd { 11pub(crate) struct InstallCmd {
12 pub client: Option<ClientOpt>, 12 pub(crate) client: Option<ClientOpt>,
13 pub server: Option<ServerOpt>, 13 pub(crate) server: Option<ServerOpt>,
14} 14}
15 15
16#[derive(Clone, Copy)] 16#[derive(Clone, Copy)]
17pub enum ClientOpt { 17pub(crate) enum ClientOpt {
18 VsCode, 18 VsCode,
19 VsCodeExploration, 19 VsCodeExploration,
20 VsCodeInsiders, 20 VsCodeInsiders,
@@ -24,7 +24,7 @@ pub enum ClientOpt {
24} 24}
25 25
26impl ClientOpt { 26impl ClientOpt {
27 pub const fn as_cmds(&self) -> &'static [&'static str] { 27 pub(crate) const fn as_cmds(&self) -> &'static [&'static str] {
28 match self { 28 match self {
29 ClientOpt::VsCode => &["code"], 29 ClientOpt::VsCode => &["code"],
30 ClientOpt::VsCodeExploration => &["code-exploration"], 30 ClientOpt::VsCodeExploration => &["code-exploration"],
@@ -60,18 +60,18 @@ impl std::str::FromStr for ClientOpt {
60 } 60 }
61} 61}
62 62
63pub struct ServerOpt { 63pub(crate) struct ServerOpt {
64 pub malloc: Malloc, 64 pub(crate) malloc: Malloc,
65} 65}
66 66
67pub enum Malloc { 67pub(crate) enum Malloc {
68 System, 68 System,
69 Mimalloc, 69 Mimalloc,
70 Jemalloc, 70 Jemalloc,
71} 71}
72 72
73impl InstallCmd { 73impl InstallCmd {
74 pub fn run(self) -> Result<()> { 74 pub(crate) fn run(self) -> Result<()> {
75 if cfg!(target_os = "macos") { 75 if cfg!(target_os = "macos") {
76 fix_path_for_mac().context("Fix path for mac")? 76 fix_path_for_mac().context("Fix path for mac")?
77 } 77 }