Skip to content

Commit

Permalink
Fix benches
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed May 15, 2019
1 parent c5db9fb commit d51a3f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benches/jwt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ extern crate test;
#[macro_use]
extern crate serde_derive;

use jwt::{decode, encode, Header, Validation};
use jwt::{decode, encode, Header, Hmac, Validation};

#[derive(Debug, PartialEq, Clone, Serialize, Deserialize)]
struct Claims {
Expand All @@ -16,7 +16,7 @@ struct Claims {
fn bench_encode(b: &mut test::Bencher) {
let claim = Claims { sub: "b@b.com".to_owned(), company: "ACME".to_owned() };

b.iter(|| encode(&Header::default(), &claim, "secret".as_ref()));
b.iter(|| encode(&Header::default(), &claim, Hmac::from(b"secret")));
}

#[bench]
Expand Down

0 comments on commit d51a3f6

Please sign in to comment.