Skip to content

Instantly share code, notes, and snippets.

@svenstaro
Last active Jun 24, 2017
Embed
What would you like to do?
pub fn register(user: Result<UserSerializer, Vec<Value>>, db: DB) -> Result<APIResponse, APIResponse> {
if user.is_err() {
let error = user.err().unwrap();
return Ok(unprocessable_entity(error));
}
let user_data = user.unwrap();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment