Skip to content

Commit 86e95da

Browse files
committed
0.4.0
1 parent 9cd5cc1 commit 86e95da

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- uses: actions/checkout@v2
1212
- uses: actions-rs/toolchain@v1
1313
with:
14-
toolchain: 1.71.0
14+
toolchain: 1.85.0
1515
default: true
1616
profile: minimal
1717
components: rustfmt, clippy

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[package]
22
name = "jwtk"
3-
version = "0.3.0"
3+
version = "0.4.0"
44
edition = "2018"
5-
repository = "https://github.com/sopium/jwtk"
5+
repository = "https://github.com/blckngm/jwtk"
66
license = "MIT"
77
description = "JWT signing (JWS) and verification, with first class JWK and JWK Set (JWKS) support."
88

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ impl<ExtraClaims> HeaderAndClaims<ExtraClaims> {
242242
pub fn iat_is_later_than(&self, t: SystemTime) -> bool {
243243
self.claims
244244
.iat
245-
.map_or(false, |iat| iat > t.duration_since(UNIX_EPOCH).unwrap())
245+
.is_some_and(|iat| iat > t.duration_since(UNIX_EPOCH).unwrap())
246246
}
247247

248248
/// Set token expiration time (`exp`) to some time after the current time,

src/rsa.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl RsaPublicKey {
224224

225225
/// Both `BEGIN PUBLIC KEY` and `BEGIN RSA PUBLIC KEY` are OK.
226226
pub fn from_pem(pem: &[u8], algorithm: Option<RsaAlgorithm>) -> Result<Self> {
227-
if std::str::from_utf8(pem).map_or(false, |pem| pem.contains("BEGIN RSA")) {
227+
if std::str::from_utf8(pem).is_ok_and(|pem| pem.contains("BEGIN RSA")) {
228228
let rsa = Rsa::public_key_from_pem_pkcs1(pem)?;
229229
Self::from_pkey(PKey::from_rsa(rsa)?, algorithm)
230230
} else {

0 commit comments

Comments
 (0)