Format code

This commit is contained in:
Matthias Beyer 2016-07-06 19:57:49 +02:00
parent b2eb2de3fd
commit 0752058cf5
1 changed files with 14 additions and 10 deletions

View File

@ -28,10 +28,10 @@ mod ui;
use ui::build_ui; use ui::build_ui;
fn main() { fn main() {
let name = "imag-todo"; let name = "imag-todo";
let version = &version!()[..]; let version = &version!()[..];
let about = "Interface with taskwarrior"; let about = "Interface with taskwarrior";
let ui = build_ui(Runtime::get_default_cli_builder(name, version, about)); let ui = build_ui(Runtime::get_default_cli_builder(name, version, about));
let rt = { let rt = {
let rt = Runtime::new(ui); let rt = Runtime::new(ui);
@ -164,17 +164,21 @@ fn list(rt: &Runtime) {
if verbose { if verbose {
args.clear(); args.clear();
args.push(format!("uuid:{} information", uuid)); args.push(format!("uuid:{} information", uuid));
let tw_process = Command::new("task").stdin(Stdio::null()).args(&args).spawn()
let tw_process = Command::new("task")
.stdin(Stdio::null())
.args(&args)
.spawn()
.unwrap_or_else(|e| { .unwrap_or_else(|e| {
trace_error(&e); trace_error(&e);
panic!("failed"); panic!("failed");
}); });
let output = tw_process.wait_with_output().unwrap_or_else(|e| { let output = tw_process
panic!("failed to unwrap output: {}", e); .wait_with_output()
}); .unwrap_or_else(|e| panic!("failed to unwrap output: {}", e));
let outstring = String::from_utf8(output.stdout).unwrap_or_else(|e| { let outstring = String::from_utf8(output.stdout)
panic!("failed to execute: {}", e); .unwrap_or_else(|e| panic!("failed to execute: {}", e));
});
println!("{}", outstring); println!("{}", outstring);
} else { } else {
println!("{}", match uuid { println!("{}", match uuid {