As far as fixing lifetime errors is concerned, I would recommend breaking your code down into a simpler form so that you can look at the lifetimes from a broader perspective. If you have a simple test case that mimics the same error that your main program has and you still can't solve it, you can simply make a gist for it and ask on the IRC and they usually are able to point out the error. In my experience with lifetime errors, doing it in this method sometimes reveals the simple error I was over looking, or in other cases after asking on IRC I learn something new about lifetimes.