mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Underengineer cargo xtask install --client
This commit is contained in:
parent
142f9a03fd
commit
bf4aaa4fb0
3 changed files with 37 additions and 70 deletions
|
@ -141,14 +141,6 @@ impl Xtask {
|
|||
// generated end
|
||||
|
||||
impl Install {
|
||||
pub(crate) fn validate(&self) -> xflags::Result<()> {
|
||||
if let Some(code_bin) = &self.code_bin {
|
||||
if let Err(err) = code_bin.parse::<ClientOpt>() {
|
||||
return Err(xflags::Error::new(format!("failed to parse `--code-bin`: {}", err)));
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
pub(crate) fn server(&self) -> Option<ServerOpt> {
|
||||
if self.client && !self.server {
|
||||
return None;
|
||||
|
@ -166,7 +158,6 @@ impl Install {
|
|||
if !self.client && self.server {
|
||||
return None;
|
||||
}
|
||||
let client_opt = self.code_bin.as_ref().and_then(|it| it.parse().ok()).unwrap_or_default();
|
||||
Some(client_opt)
|
||||
Some(ClientOpt { code_bin: self.code_bin.clone() })
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue