Better name

This commit is contained in:
Aleksey Kladov 2020-02-17 18:10:15 +01:00
parent 3ef916061b
commit 06e37b273e

View File

@ -17,7 +17,7 @@ type Result<T, E = Box<dyn Error + Send + Sync>> = std::result::Result<T, E>;
fn main() -> Result<()> {
env_logger::try_init()?;
let command = match Command::from_args()? {
let command = match Command::from_env_args()? {
Ok(it) => it,
Err(HelpPrinted) => return Ok(()),
};
@ -108,7 +108,7 @@ enum Command {
struct HelpPrinted;
impl Command {
fn from_args() -> Result<Result<Command, HelpPrinted>> {
fn from_env_args() -> Result<Result<Command, HelpPrinted>> {
let mut matches = Arguments::from_env();
let subcommand = matches.subcommand()?.unwrap_or_default();