summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/source/issue_1306.rs
blob: 03b78e34108cce3592f3406e0c0a0609d8765dba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// rustfmt-max_width: 160
// rustfmt-fn_call_width: 96
// rustfmt-fn_args_layout: Compressed
// rustfmt-trailing_comma: Always
// rustfmt-wrap_comments: true

fn foo() {
    for elem in try!(gen_epub_book::ops::parse_descriptor_file(&mut try!(File::open(&opts.source_file.1).map_err(|_| {
        gen_epub_book::Error::Io {
            desc: "input file",
            op: "open",
            more: None,
        }
    })),
                                                               "input file")) {
        println!("{}", elem);
    }
}

fn write_content() {
    io::copy(try!(File::open(in_f).map_err(|_| {
        Error::Io {
            desc: "Content",
            op: "open",
            more: None,
        }
    })),
             w);
}