Remove useless import + improve readme
This commit is contained in:
parent
e11579c604
commit
31d99324e2
|
@ -13,6 +13,14 @@ rustc-serialize = "0.3"
|
|||
## How to use
|
||||
There is a complete example in examples/claims.rs but here's a quick one.
|
||||
|
||||
In terms of imports:
|
||||
```rust
|
||||
extern crate jsonwebtoken as jwt;
|
||||
extern crate rustc_serialize;
|
||||
|
||||
use jwt::{encode, decode, Algorithm};
|
||||
```
|
||||
|
||||
### Encoding
|
||||
```rust
|
||||
// encode<T: Part>(claims: T, secret: String, algorithm: Algorithm) -> Result<String, Error>
|
||||
|
|
|
@ -3,7 +3,6 @@ extern crate test;
|
|||
extern crate jsonwebtoken as jwt;
|
||||
extern crate rustc_serialize;
|
||||
|
||||
use rustc_serialize::{Encodable};
|
||||
use jwt::{encode, decode, Algorithm};
|
||||
|
||||
#[derive(Debug, PartialEq, Clone, RustcEncodable, RustcDecodable)]
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
extern crate jsonwebtoken as jwt;
|
||||
extern crate rustc_serialize;
|
||||
|
||||
use rustc_serialize::{Encodable};
|
||||
use jwt::{
|
||||
Algorithm,
|
||||
encode,
|
||||
|
|
Loading…
Reference in New Issue