Created
March 3, 2017 03:15
-
-
Save warmwaffles/51bf12c1481a1cd5a7df5797e247907f to your computer and use it in GitHub Desktop.
This file contains 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
fn get_id(req: &mut Request) -> Option<Uuid> { | |
let param = req.extensions.get::<Router>().unwrap().find("id"); | |
match param { | |
Some(x) => Some(Uuid::parse_str(param.unwrap()).unwrap()), | |
None => None | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment