From 9ce7e8110254e8db476c96bce2eecb2d16983159 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 31 Jul 2018 15:40:40 +0300 Subject: cleanups --- cli/src/main.rs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'cli/src/main.rs') diff --git a/cli/src/main.rs b/cli/src/main.rs index f87878137..546cbb66b 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -4,8 +4,8 @@ extern crate failure; extern crate libsyntax2; extern crate tools; -use std::{fs, path::Path, io::Read}; use clap::{App, Arg, SubCommand}; +use std::{fs, io::Read, path::Path}; use tools::collect_tests; type Result = ::std::result::Result; @@ -15,8 +15,18 @@ fn main() -> Result<()> { .setting(clap::AppSettings::SubcommandRequiredElseHelp) .subcommand( SubCommand::with_name("render-test") - .arg(Arg::with_name("line").long("--line").required(true).takes_value(true)) - .arg(Arg::with_name("file").long("--file").required(true).takes_value(true)) + .arg( + Arg::with_name("line") + .long("--line") + .required(true) + .takes_value(true), + ) + .arg( + Arg::with_name("file") + .long("--file") + .required(true) + .takes_value(true), + ), ) .subcommand(SubCommand::with_name("parse")) .get_matches(); @@ -24,7 +34,7 @@ fn main() -> Result<()> { ("parse", _) => { let tree = parse()?; println!("{}", tree); - }, + } ("render-test", Some(matches)) => { let file = matches.value_of("file").unwrap(); let file = Path::new(file); @@ -36,7 +46,6 @@ fn main() -> Result<()> { _ => unreachable!(), } Ok(()) - } fn parse() -> Result { -- cgit v1.2.3