From 29aad97739a4b4a9ac7716e6867a739c549df49b Mon Sep 17 00:00:00 2001 From: Piotr Maks Date: Fri, 7 Aug 2020 18:10:26 +0200 Subject: [PATCH] Format code and check style in Github Actions (#145) --- .github/workflows/ci.yml | 19 +++++++++++++++++++ src/decoding.rs | 1 - src/lib.rs | 4 ++-- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f60c9f1..ec4f4cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,25 @@ on: jobs: + style: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + components: rustfmt + + - name: Check format + uses: actions-rs/cargo@v1 + with: + command: fmt + args: -- --check + tests: name: Tests runs-on: ${{ matrix.os }} diff --git a/src/decoding.rs b/src/decoding.rs index 1292646..810c973 100644 --- a/src/decoding.rs +++ b/src/decoding.rs @@ -250,7 +250,6 @@ pub fn dangerous_insecure_decode_with_validation( )] pub fn dangerous_unsafe_decode(token: &str) -> Result> { dangerous_insecure_decode(token) - } /// Decode a JWT without any signature verification/validations and return its [Header](struct.Header.html). diff --git a/src/lib.rs b/src/lib.rs index f92452e..9e86000 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -17,8 +17,8 @@ mod validation; pub use algorithms::Algorithm; pub use decoding::{ - dangerous_insecure_decode_with_validation, dangerous_insecure_decode, dangerous_unsafe_decode, decode, decode_header, DecodingKey, - TokenData, + dangerous_insecure_decode, dangerous_insecure_decode_with_validation, dangerous_unsafe_decode, + decode, decode_header, DecodingKey, TokenData, }; pub use encoding::{encode, EncodingKey}; pub use header::Header;