mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Simplify xtask
lib/bin/test separation isn't really needed.
This commit is contained in:
parent
c17f2bf2a2
commit
d9dcfd81c5
17 changed files with 167 additions and 180 deletions
|
@ -8,13 +8,13 @@ use xshell::{cmd, pushd};
|
|||
// Latest stable, feel free to send a PR if this lags behind.
|
||||
const REQUIRED_RUST_VERSION: u32 = 50;
|
||||
|
||||
pub struct InstallCmd {
|
||||
pub client: Option<ClientOpt>,
|
||||
pub server: Option<ServerOpt>,
|
||||
pub(crate) struct InstallCmd {
|
||||
pub(crate) client: Option<ClientOpt>,
|
||||
pub(crate) server: Option<ServerOpt>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum ClientOpt {
|
||||
pub(crate) enum ClientOpt {
|
||||
VsCode,
|
||||
VsCodeExploration,
|
||||
VsCodeInsiders,
|
||||
|
@ -24,7 +24,7 @@ pub enum ClientOpt {
|
|||
}
|
||||
|
||||
impl ClientOpt {
|
||||
pub const fn as_cmds(&self) -> &'static [&'static str] {
|
||||
pub(crate) const fn as_cmds(&self) -> &'static [&'static str] {
|
||||
match self {
|
||||
ClientOpt::VsCode => &["code"],
|
||||
ClientOpt::VsCodeExploration => &["code-exploration"],
|
||||
|
@ -60,18 +60,18 @@ impl std::str::FromStr for ClientOpt {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct ServerOpt {
|
||||
pub malloc: Malloc,
|
||||
pub(crate) struct ServerOpt {
|
||||
pub(crate) malloc: Malloc,
|
||||
}
|
||||
|
||||
pub enum Malloc {
|
||||
pub(crate) enum Malloc {
|
||||
System,
|
||||
Mimalloc,
|
||||
Jemalloc,
|
||||
}
|
||||
|
||||
impl InstallCmd {
|
||||
pub fn run(self) -> Result<()> {
|
||||
pub(crate) fn run(self) -> Result<()> {
|
||||
if cfg!(target_os = "macos") {
|
||||
fix_path_for_mac().context("Fix path for mac")?
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue