Rewrite path::Display to reduce unnecessary allocation