Skip to content

Instantly share code, notes, and snippets.

@bugaevc bugaevc/
Last active May 2, 2016

What would you like to do?
// this does not compile
fn middle_name(full_name: &str) -> &str {
fn main() {
let res;
let name = String::from("Harry James Potter");
res = middle_name(&name);
assert_eq!(res, "James");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.