diff --git a/.travis.yml b/.travis.yml index 9516edd..543c52a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,8 +39,12 @@ matrix: rust: stable before_script: - rustup component add clippy-preview + - cargo clippy --version + - rustup component add rustfmt + - rustfmt --version script: - cargo clippy --all-targets --all-features -- -D warnings + - cargo fmt --all -- --check - cargo test --verbose - cargo build --release --target $TARGET --locked <<: *DEPLOY_TO_GITHUB @@ -48,7 +52,11 @@ matrix: - name: Linux-Beta env: TARGET=x86_64-unknown-linux-gnu rust: beta + before_script: + - rustup component add rustfmt + - rustfmt --version script: + - cargo fmt --all -- --check - cargo test --verbose - cargo build --verbose @@ -57,8 +65,12 @@ matrix: rust: nightly before_script: - rustup component add clippy-preview + - cargo clippy --version + - rustup component add rustfmt + - rustfmt --version script: - cargo clippy --all-targets --all-features -- -D warnings + - cargo fmt --all -- --check - cargo test --verbose - cargo build --verbose @@ -68,8 +80,12 @@ matrix: rust: stable before_script: - rustup component add clippy-preview + - cargo clippy --version + - rustup component add rustfmt + - rustfmt --version script: - cargo clippy --all-targets --all-features -- -D warnings + - cargo fmt --all -- --check - cargo test --verbose - cargo build --release --target $TARGET --locked <<: *DEPLOY_TO_GITHUB @@ -78,7 +94,11 @@ matrix: os: windows env: TARGET=x86_64-pc-windows-msvc rust: beta + before_script: + - rustup component add rustfmt + - rustfmt --version script: + - cargo fmt --all -- --check - cargo test --verbose - cargo build --verbose @@ -88,7 +108,11 @@ matrix: rust: nightly before_script: - rustup component add clippy-preview + - cargo clippy --version + - rustup component add rustfmt + - rustfmt --version script: - cargo clippy --all-targets --all-features -- -D warnings + - cargo fmt --all -- --check - cargo test --verbose - cargo build --verbose diff --git a/src/main.rs b/src/main.rs index 85e94c9..8c78aa9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ extern crate clap; extern crate supernova; -use clap::{App, Arg, crate_name, crate_version}; +use clap::{crate_name, crate_version, App, Arg}; use std::process; use supernova::Config; @@ -12,13 +12,15 @@ fn main() { Arg::with_name("USERNAME") .help("The user whose stars to collect") .required(true), - ).arg( + ) + .arg( Arg::with_name("TOKEN") .short("t") .long("token") .help("Sets the authentication token for requests to GitHub") .takes_value(true), - ).get_matches() + ) + .get_matches() .into(); if let Err(e) = supernova::collect_stars(config) {