Skip to content

Commit dd147d3

Browse files
committed
Run Rustfmt and make formatting error fail the CI
1 parent fa6f929 commit dd147d3

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,6 @@ matrix:
181181
script:
182182
- cargo fmt --all -- */*.rs --check
183183

184-
allow_failures:
185-
# Formatting errors should appear in Travis, but not break the build.
186-
- name: "rustfmt"
187-
188184
before_install:
189185
- set -e
190186
- rustup self update

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ cfg_if! {
269269
/// [`rand::thread_rng`](https://docs.rs/rand/*/rand/fn.thread_rng.html).
270270
pub fn getrandom(dest: &mut [u8]) -> Result<(), error::Error> {
271271
if dest.is_empty() {
272-
return Ok(())
272+
return Ok(());
273273
}
274274
imp::getrandom_inner(dest)
275275
}

0 commit comments

Comments
 (0)