Keats / jsonwebtoken

JWT lib in rust
MIT License
1.64k stars 260 forks source link

Default update syntax on Validation struct broken because of private field #255

Closed fpgaminer closed 2 years ago

fpgaminer commented 2 years ago

Under version 7.1.2, my code used:

Validation {
    validate_exp: true,
    sub: Some("rM User Token".to_string()),
    ..Default::default()
}

Trying to update to 8.1.0, this no longer works because validate_signature is a private field.

I'm not sure if this was intended or not? Update syntax is a nice convenience, though I can replace it in my code if need be.

Keats commented 2 years ago

Hm I didn't realise that it would break in that way. I'm not going to make the field public though

fpgaminer commented 2 years ago

Fair enough. I think the only convenient "replacement" would be an expanded new or builder syntax. But that's not a bug, so I'll go ahead and close this. Thanks!