diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7ae98f3..fb1e42e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,10 +1,6 @@ name: Rust -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] +on: [push, pull_request] env: CARGO_TERM_COLOR: always @@ -20,3 +16,5 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + - name: Check format + run: cargo fmt -- --check diff --git a/src/dateparser.rs b/src/dateparser.rs index 099c453..142e28d 100644 --- a/src/dateparser.rs +++ b/src/dateparser.rs @@ -1,6 +1,6 @@ use std::ops::Range; -use chrono::{DateTime, FixedOffset, Utc, NaiveDateTime, NaiveTime, ParseError, TimeZone}; +use chrono::{DateTime, FixedOffset, NaiveDateTime, NaiveTime, ParseError, TimeZone, Utc}; use regex::Regex; type DateParsingFun = fn(s: &str) -> Result, ParseError>;