Skip to content

Add `@discardableResult` attribute to `verify(as:)` functions

Choose a tag to compare

@VaporBot VaporBot released this 08 Jul 23:59
· 29 commits to main since this release
506d238
This patch was authored by @jiahan-wu and released by @0xTim.

Marks JWT's verify(as:) functions with @discardableResult so you can verify then without reading the contents in a clean way. For example

let _ = try req.jwt.verify(as: Payload.self)

Can become:

try req.jwt.verify(as: Payload.self)