Riding along, or alongside, the lane separation lines causes confusion for follwing traffic and danger for you; take a primary position. Having said that, the driver shouldn't have passed you so closely. He could have given you more room if he'd passed you on your nearside.