Format code and check style in Github Actions (#145)

This commit is contained in:
Piotr Maks 2020-08-07 18:10:26 +02:00 committed by GitHub
parent a2c259588a
commit 29aad97739
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 3 deletions

View File

@ -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 }}

View File

@ -250,7 +250,6 @@ pub fn dangerous_insecure_decode_with_validation<T: DeserializeOwned>(
)]
pub fn dangerous_unsafe_decode<T: DeserializeOwned>(token: &str) -> Result<TokenData<T>> {
dangerous_insecure_decode(token)
}
/// Decode a JWT without any signature verification/validations and return its [Header](struct.Header.html).

View File

@ -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;