Fix example

This commit is contained in:
Vincent Prouillet 2016-12-26 13:20:18 +09:00
parent 75ce72e4ce
commit e715eb4930
1 changed files with 2 additions and 2 deletions

View File

@ -13,8 +13,8 @@ struct Claims {
// Example validation implementation
impl Claims {
fn is_valid(self) -> bool {
if self.company != "ACME".to_owned() {
fn is_valid(&self) -> bool {
if self.company != "ACME" {
return false;
}
// expiration etc