Skip to content

Commit 637ed01

Browse files
committed
rustfmt
1 parent b81ed84 commit 637ed01

File tree

6 files changed

+897
-675
lines changed

6 files changed

+897
-675
lines changed

.rustfmt.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
array_layout = "Block"
2+
fn_args_layout = "Block"
3+
fn_call_style = "Block"
4+
generics_indent = "Block"
5+
max_width = 80
6+
where_style = "Rfc"
7+
write_mode = "overwrite"

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.rs

Lines changed: 33 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ use std::process::Command;
88
struct IgnoredError {}
99

1010
impl<E> From<E> for IgnoredError
11-
where E: Error
11+
where
12+
E: Error,
1213
{
1314
fn from(_: E) -> IgnoredError {
1415
IgnoredError {}
@@ -32,15 +33,38 @@ fn commit_info() -> String {
3233
}
3334

3435
fn commit_hash() -> Result<String, IgnoredError> {
35-
Ok(try!(String::from_utf8(try!(Command::new("git")
36-
.args(&["rev-parse", "--short", "HEAD"])
37-
.output())
38-
.stdout)))
36+
Ok(
37+
try!(
38+
String::from_utf8(
39+
try!(
40+
Command::new("git")
41+
.args(&["rev-parse", "--short", "HEAD"])
42+
.output()
43+
)
44+
.stdout,
45+
)
46+
),
47+
)
3948
}
4049

4150
fn commit_date() -> Result<String, IgnoredError> {
42-
Ok(try!(String::from_utf8(try!(Command::new("git")
43-
.args(&["log", "-1", "--date=short", "--pretty=format:%cd"])
44-
.output())
45-
.stdout)))
51+
Ok(
52+
try!(
53+
String::from_utf8(
54+
try!(
55+
Command::new("git")
56+
.args(
57+
&[
58+
"log",
59+
"-1",
60+
"--date=short",
61+
"--pretty=format:%cd",
62+
],
63+
)
64+
.output()
65+
)
66+
.stdout,
67+
)
68+
),
69+
)
4670
}

0 commit comments

Comments
 (0)