mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Better name
This commit is contained in:
parent
3ef916061b
commit
06e37b273e
1 changed files with 2 additions and 2 deletions
|
@ -17,7 +17,7 @@ type Result<T, E = Box<dyn Error + Send + Sync>> = std::result::Result<T, E>;
|
||||||
fn main() -> Result<()> {
|
fn main() -> Result<()> {
|
||||||
env_logger::try_init()?;
|
env_logger::try_init()?;
|
||||||
|
|
||||||
let command = match Command::from_args()? {
|
let command = match Command::from_env_args()? {
|
||||||
Ok(it) => it,
|
Ok(it) => it,
|
||||||
Err(HelpPrinted) => return Ok(()),
|
Err(HelpPrinted) => return Ok(()),
|
||||||
};
|
};
|
||||||
|
@ -108,7 +108,7 @@ enum Command {
|
||||||
struct HelpPrinted;
|
struct HelpPrinted;
|
||||||
|
|
||||||
impl Command {
|
impl Command {
|
||||||
fn from_args() -> Result<Result<Command, HelpPrinted>> {
|
fn from_env_args() -> Result<Result<Command, HelpPrinted>> {
|
||||||
let mut matches = Arguments::from_env();
|
let mut matches = Arguments::from_env();
|
||||||
let subcommand = matches.subcommand()?.unwrap_or_default();
|
let subcommand = matches.subcommand()?.unwrap_or_default();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue