instructure / paseto

A paseto implementation in rust.
MIT License
150 stars 13 forks source link

Simplify features build #24

Closed vbfox closed 4 years ago

vbfox commented 4 years ago

Note: this PR builds on #23 and provide a more feature-proof fix of the problem.

Motivation

The source of #23 is that there was code duplication so fixes were only applied to one of the variants.

This change move the conditional check for v1 & v2 in the builder inside the methods instead of duplicating them

Test Plan (required)

I ran both cargo build and cargo test with/without v1 & v2 (There are still a few unused things warning when only one of them is present but they build and pass tests)

Mythra commented 4 years ago

This needs to be rebased, and then I can take a look :smile: Thanks for answering part of my previous question heh.

vbfox commented 4 years ago

@SecurityInsanity done

Mythra commented 4 years ago

Hey sorry can you rebase again? :sweat_smile: (no need to comment when you're done, I'll just checkback later today :smile: )

Mythra commented 4 years ago

Thank you!