This could be `<'a>(input: &'a str) -> HashMap<&'a str, uint>`, which removes the need for the `.to_owned()` call.