Created
March 16, 2017 11:40
-
-
Save goyox86/b0d2c7241223dd7bd1800c85bf3fee66 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
impl From<NewUser> for NewUserReadyForInsertion { | |
fn from(user: NewUser) -> NewUserReadyForInsertion { | |
NewUserReadyForInsertion { | |
name: user.name, | |
username: user.username, | |
email: user.email, | |
// TODO: Adress this unwrap | |
hashed_password: hash(&user.password, DEFAULT_COST).unwrap() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment