Skip to content

Commit 5fb6531

Browse files
committed
rustfmt: libflate, libfmt_macros, libgetopts, libgraphviz, liblog, librand
1 parent 0dfd875 commit 5fb6531

File tree

12 files changed

+503
-478
lines changed

12 files changed

+503
-478
lines changed

src/libflate/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ impl Drop for Bytes {
8282
}
8383

8484
#[link(name = "miniz", kind = "static")]
85-
extern {
85+
extern "C" {
8686
/// Raw miniz compression function.
8787
fn tdefl_compress_mem_to_heap(psrc_buf: *const c_void,
8888
src_buf_len: size_t,

src/libfmt_macros/lib.rs

+6-8
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ impl<'a> Parser<'a> {
187187
Parser {
188188
input: s,
189189
cur: s.char_indices().peekable(),
190-
errors: vec!(),
190+
errors: vec![],
191191
}
192192
}
193193

@@ -236,7 +236,7 @@ impl<'a> Parser<'a> {
236236
if c.is_whitespace() {
237237
self.cur.next();
238238
} else {
239-
break
239+
break;
240240
}
241241
}
242242
}
@@ -274,9 +274,7 @@ impl<'a> Parser<'a> {
274274
ArgumentIs(i)
275275
} else {
276276
match self.cur.peek() {
277-
Some(&(_, c)) if c.is_alphabetic() => {
278-
ArgumentNamed(self.word())
279-
}
277+
Some(&(_, c)) if c.is_alphabetic() => ArgumentNamed(self.word()),
280278
_ => ArgumentNext,
281279
}
282280
}
@@ -294,7 +292,7 @@ impl<'a> Parser<'a> {
294292
ty: &self.input[..0],
295293
};
296294
if !self.consume(':') {
297-
return spec
295+
return spec;
298296
}
299297

300298
// fill character
@@ -419,7 +417,7 @@ impl<'a> Parser<'a> {
419417
found = true;
420418
self.cur.next();
421419
} else {
422-
break
420+
break;
423421
}
424422
}
425423
if found {
@@ -447,7 +445,7 @@ mod tests {
447445
precision: CountImplied,
448446
width: CountImplied,
449447
ty: "",
450-
}
448+
};
451449
}
452450

453451
fn musterr(s: &str) {

0 commit comments

Comments
 (0)