Minor fixes for code style consistency

As I've been looking around cargo's source I ended up making some changes to keep the code style more consistent.
This I would prefer to leave the brace on its own line because it's tough to see where the functions start and where the definition ends otherwise.